change asp.net hyperlink

Discussion in 'ASP .Net Building Controls' started by Rob Rogers, Sep 2, 2004.

  1. Rob Rogers

    Rob Rogers Guest

    I have a frameset that uses asp.net pages. The left frameset has a
    hyperlink control that targets the main frame and it works fine. The
    problem is, I want to change the parameters passed to the main asp.net
    page depending on what a user selects from a drop down list.
    So the user would select a state from a drop down list in the left
    frame, and I want to pass the state selected to the main frame when an
    Image button is pressed. How can I change the hyperlink url
    programatically?

    Here is my code.

    <%@Page Explicit="True" Language="VB" Debug="True" %>
    <HTML>
    <script runat="server">


    </script>
    <body>
    <h1>Jump Page</h1>
    <form runat="server">
    <P>
    Jump To:<br>
    <asp:dropdownlist id="JumpTo" runat="server" autopostback="true">
    <asp:listitem></asp:listitem>
    <asp:listitem>AL</asp:listitem>
    <asp:listitem>AK</asp:listitem>
    <asp:listitem>AZ</asp:listitem>
    <asp:listitem>AR</asp:listitem>
    <asp:listitem>CA</asp:listitem>
    <asp:listitem>CO</asp:listitem>
    <asp:listitem>CT</asp:listitem>
    <asp:listitem>DE</asp:listitem>
    <asp:listitem>DC</asp:listitem>
    <asp:listitem>FL</asp:listitem>
    <asp:listitem>GA</asp:listitem>
    <asp:listitem>HI</asp:listitem>
    <asp:listitem>ID</asp:listitem>
    <asp:listitem>IL</asp:listitem>
    <asp:listitem>IN</asp:listitem>
    <asp:listitem>IA</asp:listitem>
    <asp:listitem>KS</asp:listitem>
    <asp:listitem>KY</asp:listitem>
    <asp:listitem>LA</asp:listitem>
    <asp:listitem>ME</asp:listitem>
    <asp:listitem>MD</asp:listitem>
    <asp:listitem>MA</asp:listitem>
    <asp:listitem>MI</asp:listitem>
    <asp:listitem>MN</asp:listitem>
    <asp:listitem>MS</asp:listitem>
    <asp:listitem>MO</asp:listitem>
    <asp:listitem>MT</asp:listitem>
    <asp:listitem>NE</asp:listitem>
    <asp:listitem>NV</asp:listitem>
    <asp:listitem>NH</asp:listitem>
    <asp:listitem>NJ</asp:listitem>
    <asp:listitem>NM</asp:listitem>
    <asp:listitem>NY</asp:listitem>
    <asp:listitem>NC</asp:listitem>
    <asp:listitem>ND</asp:listitem>
    <asp:listitem>OK</asp:listitem>
    <asp:listitem>OH</asp:listitem>
    <asp:listitem>OR</asp:listitem>
    <asp:listitem>PA</asp:listitem>
    <asp:listitem>RI</asp:listitem>
    <asp:listitem>SC</asp:listitem>
    <asp:listitem>SD</asp:listitem>
    <asp:listitem>TN</asp:listitem>
    <asp:listitem>TX</asp:listitem>
    <asp:listitem>UT</asp:listitem>
    <asp:listitem>VT</asp:listitem>
    <asp:listitem>VA</asp:listitem>
    <asp:listitem>WA</asp:listitem>
    <asp:listitem>WV</asp:listitem>
    <asp:listitem>WI</asp:listitem>
    <asp:listitem>WY</asp:listitem>
    </asp:dropdownlist></P>
    <P><br>
    <br>
    </ASP:IMAGEBUTTON>
    <asp:HyperLink id="HyperLink1" runat="server" Target="mainFrame"
    NavigateUrl="http://www.natltc.com/search.aspx?St=Ok">HyperLink</asp:HyperLink></P>
    </form>
    </body>
    </HTML>
     
    Rob Rogers, Sep 2, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Claire Reed

    change datagrid column to hyperlink

    Claire Reed, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    547
    Marina
    Aug 4, 2003
  2. Robbo
    Replies:
    1
    Views:
    4,480
    Rick Strahl [MVP]
    Oct 18, 2003
  3. Davíð Þórisson

    ASP -> ASP.Net, using hyperlink actions

    Davíð Þórisson, Oct 5, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    808
    =?Utf-8?B?UGF0cmljay5PLklnZQ==?=
    Oct 6, 2004
  4. Replies:
    3
    Views:
    712
  5. davetichenor
    Replies:
    1
    Views:
    1,109
    Eliyahu Goldin
    Oct 30, 2006
  6. Ken
    Replies:
    1
    Views:
    682
    Alvin Bruney
    Aug 16, 2003
  7. loveena sukhija via .NET 247

    how to change the colour of hyperlink used in datagrid in vb.net on CLICK EVENT?

    loveena sukhija via .NET 247, May 30, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    245
    loveena sukhija via .NET 247
    May 30, 2005
  8. Dave
    Replies:
    0
    Views:
    1,242
Loading...