Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 26-03-2009
Member
 
Join Date: Jan 2009
Posts: 134
Parameter passing using NavigateURL

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
Reply With Quote
  #2  
Old 26-03-2009
Member
 
Join Date: Apr 2008
Posts: 193
Re: Parameter passing using NavigateURL

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>
Reply With Quote
  #3  
Old 26-03-2009
Member
 
Join Date: Dec 2008
Posts: 183
Re: Parameter passing using NavigateURL

'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.
Reply With Quote
  #4  
Old 26-03-2009
Member
 
Join Date: Oct 2008
Posts: 167
Re: Parameter passing using NavigateURL

I use hyperlink column fine with embedded quotes with csharp like so:

Code:
<asp:HyperLink id=HyperLink1
runat="server"
Font-Size="Smaller"
ForeColor="#0000CC"
Font-Names="verdana"
NavigateUrl='<%# "?categoryid=" + DataBinder.Eval(Container.DataItem,"report_category_id") + "&amp;office=" + Request.QueryString["office"] %>'>
<%# DataBinder.Eval(Container.DataItem,"report_category_name") %>
</asp:HyperLink>
So, change the plus signs to ampersands (and the pound sign out?) if you're using VB.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Parameter passing using NavigateURL"
Thread Thread Starter Forum Replies Last Post
Passing object as a parameter in a method Karumbu Software Development 4 06-01-2011 01:07 AM
Passing an ArrayList From the Form as Parameter Sheenas Software Development 8 20-06-2010 10:45 AM
Problem While Passing Parameter To Servlet In JSP Jagdish Gada Software Development 5 29-01-2010 02:33 PM
Passing function parameter and static Banjiji Software Development 3 27-10-2009 07:32 PM
Passing parameter of Oracle procedure in PHP Halina Software Development 3 22-04-2009 08:46 PM


All times are GMT +5.5. The time now is 12:01 PM.