Hi all,
How can i pass parameter through "navigateURL" property of hyper link in a datlist, so that i can retrieve the information in another page, referring that parameter in select statement?
Thanks
Printable View
Hi all,
How can i pass parameter through "navigateURL" property of hyper link in a datlist, so that i can retrieve the information in another page, referring that parameter in select statement?
Thanks
How about this:
Code:<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>
'Within the Page_Load for the form1 (Financial.aspx.cs)
Code:// Add a parameter to pass volume checkbox data
string s = "";
if (VolumeCheckbox.Checked == true)
s = s + "Volume=1";
else
s = s + "Volume=0";
// Add a parameter to pass symbol combobox data
s = s + "&Symbol=" + SymbolComboBox.Value.ToString();
PegoWeb1.ImageUrl = "Financial2.aspx?" + s;
Within the Page_Load of the form2.
string sVolume;
string sSymbol;
sVolume = this.Request.QueryString.Get("Volume");
sSymbol = this.Request.QueryString.Get("Symbol");
Note the "?" at end of ImageUrl = "Financial2.aspx?".
Note you can string together multiple parameters separating with "&" symbol.
I use hyperlink column fine with embedded quotes with csharp like so:
So, change the plus signs to ampersands (and the pound sign out?) if you're using VB.Code:<asp:HyperLink id=HyperLink1
runat="server"
Font-Size="Smaller"
ForeColor="#0000CC"
Font-Names="verdana"
NavigateUrl='<%# "?categoryid=" + DataBinder.Eval(Container.DataItem,"report_category_id") + "&office=" + Request.QueryString["office"] %>'>
<%# DataBinder.Eval(Container.DataItem,"report_category_name") %>
</asp:HyperLink>