|
Hi, for a normal button, I may associate it with a javascript funtion to execute in the code file behind (.aspx.cs) like Button1.Attributes.Add("onclick","myJavascriptFunction();" upon being clicked. what if the button is in a DataGrid button column, how can I do that? code is like: <asp:ButtonColumn Text="Restart" ButtonType="PushButton" CommandName="....">. is it possible to do the same thing like a normal button?
Thank u!!!
|
|
|
just to restate my question to make it clearer;;;
for a normal button, I may associate it with a javascript funtion to execute first before the backend time-consuming function is called. In the code file behind (.aspx.cs) the code will be like Button1.Attributes.Add("onclick","myJavascriptFunction();" upon being clicked. what if the button is in a DataGrid button column, how can I do that?
is it possible to do the same thing like a normal button?
Thank u!!!
|
|
|
I solved the problem, thank u
|
|
|
I assume you used the ItemDataBound event? If not, I'd like to know the technique you did use. Call me a collector.
|
|
|
|
|
exactly, I used ItemDataBound event
|
|
|
Can you send me the exact sample please?
to "seeyem@gmail.com"
|
|
|