Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
Ken #1
Dynamically Hyperlink and Event Handler for the Hyperlink ?
Hi,
I´m creating an Hyperlink dynamically for my DataGrid:
HyperLink hl = new HyperLink();
hl.Text = "MyLink";
hl.NavigateUrl = "#";
e.Item.Cells[3].Controls.Add(hl);
When the user clicks that HyperLink, instead of sending to an specified URL
in the
NavigateUrl, example : hl.NavigateUrl = [url]http://www.site.com;[/url] I want to
'catch' the
click event and call a Method instead
private void MyMethod()
{
// do something here!
}
Any ideas for that?
Ken.
Ken Guest
-
How do I get the Clicked Event on Hyperlink to execute a Command?
I have a ButtonColumn as a link. When the user clicks on it, I want to execute a command to query a database and display data in another grid. I... -
how to change the colour of hyperlink used in datagrid in vb.net on CLICK EVENT?
(Type your message here) please send the coding in VB.NET or HTML for changing the colour of HYPERLINK used in DATAGRID(from COLUMNS property of... -
Hyperlink Column Event Handler...
Hi, I have a hyperlink column for my datagrid. I do not want to use the query string and expose the "app_id" in that. Instead I would like to... -
DataGrid's UpdateCommand event handler and CancelCommand handler problem
I am having the same problem: the wrong event handler is being fired when column headings and page changes are clicked. I am using the datagrid... -
Assign Javascript event handler function dynamically to a Flash object event?
I have a Flash player object embedded in one of my web pages. I want to assign code to the OnReadyStateChange event for the object. Every... -
Alvin Bruney #2
Re: Dynamically Hyperlink and Event Handler for the Hyperlink ?
you need to add this line when you generate your control
hl.Click +=new EventHandler(MyMethod);
your mymethod must be declared like this to match the click event delegate
private void MyMethod(object sender, System.EventArgs e)
"Ken" <ken_awamura@hotmail.com> wrote in message
news:#xcJlemYDHA.2204@TK2MSFTNGP12.phx.gbl...URL> Hi,
>
> I´m creating an Hyperlink dynamically for my DataGrid:
>
>
> HyperLink hl = new HyperLink();
> hl.Text = "MyLink";
> hl.NavigateUrl = "#";
> e.Item.Cells[3].Controls.Add(hl);
>
> When the user clicks that HyperLink, instead of sending to an specified> in the
> NavigateUrl, example : hl.NavigateUrl = [url]http://www.site.com;[/url] I want to
> 'catch' the
> click event and call a Method instead
>
> private void MyMethod()
> {
> // do something here!
> }
>
> Any ideas for that?
> Ken.
>
>
>
Alvin Bruney Guest



Reply With Quote

