Thursday, 14 February 2013

Get anchar tag on server side in asp.net

html//
<a id="cust_act" class="tools-text" title="Validate Customer" href='............' onserverclick="Cust_Validate" onclick="return confirm('Are you sure to do this Record?')" runat="server">
   your text</a>

onserver side

protected void Cust_Validate(object s, System.EventArgs e)
    {
        HtmlAnchor cust_act = (HtmlAnchor)s;
        string ID = cust_act.HRef;
string ID = cust_act.InnerText;
}

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...