Results 1 to 4 of 4

Thread: Parameter passing using NavigateURL

  1. #1
    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

  2. #2
    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>

  3. #3
    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.

  4. #4
    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.

Similar Threads

  1. Passing object as a parameter in a method
    By Karumbu in forum Software Development
    Replies: 4
    Last Post: 06-01-2011, 01:07 AM
  2. Passing an ArrayList From the Form as Parameter
    By Sheenas in forum Software Development
    Replies: 8
    Last Post: 20-06-2010, 10:45 AM
  3. Problem While Passing Parameter To Servlet In JSP
    By Jagdish Gada in forum Software Development
    Replies: 5
    Last Post: 29-01-2010, 02:33 PM
  4. Passing function parameter and static
    By Banjiji in forum Software Development
    Replies: 3
    Last Post: 27-10-2009, 07:32 PM
  5. Passing parameter of Oracle procedure in PHP
    By Halina in forum Software Development
    Replies: 3
    Last Post: 22-04-2009, 08:46 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,067,034.40435 seconds with 16 queries