Answered by:
Passing multiple parameter in NavigateUrl (hyperlink) in GridView

Question
-
User321374275 posted
Hello,
Have created a gridview with a hyperlink column (in template) in it.
I need to pass 3 or 4 values to the web form by clicking hyperlink column in gridview.I have managed to pass a single value to web form.
Could you please suggest me how to pass 3 or 4 values (both bounded values as well as non bounded values) using the above approach.
Here NavigateUrl property is used to pass value.
Best Regards,
Kalai
Friday, February 8, 2008 11:49 AM
Answers
-
User-1995538749 posted
How about this:
<asp:hyperlink runat="server" id="hlDividents" navigateurl='<%# String.Format("TreatyRuleDetail.aspx?Rate={0}&Field2={1}&Field3={2}&Field4=something", Eval("Dividents"), Eval("Field2"), Eval("Field3")) %>' text='<%# Eval("Dividents") %>'> </asp:hyperlink>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 8, 2008 11:54 AM -
User-1281179732 posted
concatenate your data where your retrieve
for example if sql
select (cola + colb) as concat
from .....
if is business object add calculated property
string Concat
{
get {return filelda + fieldb }
}
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 8, 2008 11:55 AM
All replies
-
User-1995538749 posted
How about this:
<asp:hyperlink runat="server" id="hlDividents" navigateurl='<%# String.Format("TreatyRuleDetail.aspx?Rate={0}&Field2={1}&Field3={2}&Field4=something", Eval("Dividents"), Eval("Field2"), Eval("Field3")) %>' text='<%# Eval("Dividents") %>'> </asp:hyperlink>
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 8, 2008 11:54 AM -
User-1281179732 posted
concatenate your data where your retrieve
for example if sql
select (cola + colb) as concat
from .....
if is business object add calculated property
string Concat
{
get {return filelda + fieldb }
}
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Friday, February 8, 2008 11:55 AM -
User1070134404 posted
navigateurl='<%# String.Format("TreatyRuleDetail.aspx?Rate={0}&Field2={1}&Field3={2}&Field4=something", Eval("Dividents"), Eval("Field2"), Eval("Field3")) %>'
Is it possible to pull in control values at the same time into the QueryString of the URL? i.e. textbox1.text ?
Monday, August 4, 2008 1:55 PM -
User-1995538749 posted
You could do it, but you'd have to do it programmatically instead of declaratively.
Monday, August 4, 2008 2:38 PM