.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Melody Anderson

Home >> Articles >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Articles

How do I specify more than one parameter for my HyperlinkColumn?

Posted By:Meetu Choudhary       Posted Date: June 08, 2009    Points: 25    Category: Javascript    URL: http://www.dotnetspark.com  

How do I specify more than one parameter for my HyperlinkColumn?

Many times will developing the applications we come accross the thing that how i can pass more then one parameter in the query string which is genertated by the datagrid or gridviews... once i was developing an application and the same problem came accross at that time i was quite new to ASP.net and was stucked there did lots of googleing and found the answer now today i want to share that piece of code as an example may be i may help you to avoid a bit burdden of yours to find the code

Here i have encoded the querstring or the URL to avoid some unwanted error which are normaly genertaed due to spaces and special characters.

the code follows like

< asp:DataGrid id="DataGrid1" runat="server" AutoGenerateColumns="False" >
< Columns >
< asp:TemplateColumn HeaderText="Sample Column" >
< ItemTemplate >
< asp:Hyperlink runat="server" Text='<%#Container.DataItem("TextVal")%>' NavigateUrl='<%# "page.aspx?Param1=" & Server.UrlEncode(Container.DataItem("Val1")) & "&Param2=" & Server.UrlEncode(Container.DataItem("Val2"))%>'/>


Thanks and regards

Meetu Choudhary

 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend