hi i have a problem regarding to datagrid in aspdotnet.i
have a datagrid in my application.i have to place
add,edit,delete buttons or links what ever it may be.
now the problem is if i click on add button then the page
has to redirected to another form called "xyz.aspx" and if
i click on edit button the page has to redirected to
another form called "abc.aspx".i am phasing the problem
that if where ever i click on the datagrid the cursor goes
to gv1_SelectedIndexChanged event.please tell me the
solution about the code.
Answer Posted / anant anand gupta
You can use the ItemCommand event of the datagrid.
give each command button a 'CommandName'
And 'CommandArgument' if required. CommandArgument you can
assign at the time of ItemDataBound (or RowDataBound) event
of the DataGrid. In the event handler method you can check
for the command name and perform the required task.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is a user session?
What is repository pattern in mvc.net? : asp.net mvc
What is form method?
Where can I get information on cookies in asp.net?
Where do the cookie state and session state information be stored?
What is the difference between trace and debug in asp.net?
What are the event handlers that can be included in the Global.asax file?
Is a dll file an executable?
What's the difference between viewstate and sessionstate?
What does asp in asp.net stand for?
Where session id is stored?
How long should a session id be?
What is full form of asp.net?
What are the benefits of view state?
How can we create a website?