I have a html button with runat=server tag, whoose Name has been set dynamically during run time.
protected void Page_Load(object sender, EventArgs e)
{
btnShowHideCols.Name = "some text here";
}
the button HTML code is like below.
<input id="btnShowHideCols" type="button" value="+/-" runat="server" onclick="return btnShowHideCols_onclick()" />
How Do I get the button name form inside the javascript function? can I get the sender of the event there?
You may do this:
and than:
While writing something like
onclick=""oronchange=""or any other event you can refer to current object with this.Also, note that name will not be the same like in your code. It will be changed to something like ctl00$content$test, just the same as ID