ASP.NET 2.0 Question: Download Questions PDF
In A Page I have gridview with Options of select and delete using hyperlink when i am selecting any one of then it has to open another page how can it?
![ASP.NET 2.0 Interview Answer ASP.NET 2.0 Interview Question](https://globalguideline.com/public/images/interview/15.png)
Answer:
You can have template column for select and delete instead of the databound column. In which you can mention the destination page where you need to navigate.
Using RowDataBound event, you can add attribute to the select and delete hyperlink like:
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction()")
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction('"& If any argument &"')").
Using RowDataBound event, you can add attribute to the select and delete hyperlink like:
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction()")
e.Row.Cells(CellPosition).Controls(0).Attributes.Add("OnClick","return fnJavascriptFunction('"& If any argument &"')").
Download ASP.NET 2.0 Interview Questions And Answers
PDF
Previous Question | Next Question |
What types of data validation events are commonly seen in the client-side form validation? | Web service support a) Data set b) dataReader c) both of above d) none of above |