Hyperlinks and viewstate

Discussion in 'ASP .Net' started by John, Jul 5, 2003.

  1. John

    John Guest

    Hi all,

    My app contains a datagrid with hyperlinks inside and these hyperlinks all
    point back to the same page. The problem is that I have a 'search' user
    control and the viewstate changes once the hyperlink has been clicked,
    causing the Page_Load event of my user control to fire (which is what I
    don't want). Is there any way to structure the hyperlink such that the
    viewstate of my other user controls on the page do not change? If so, how do
    I do this? If not, what other method could I use?

    Regards
    John.
     
    John, Jul 5, 2003
    #1
    1. Advertising

  2. John

    David Waz... Guest

    Page_Load ALWAYS fires, reglardless of how you get to a page, user control
    or custom control.

    If you use an ASP:LinkButton control instead of an html hyperlink, I think
    your problems may be fixed...


    "John" <> wrote in message
    news:...
    > Hi all,
    >
    > My app contains a datagrid with hyperlinks inside and these hyperlinks all
    > point back to the same page. The problem is that I have a 'search' user
    > control and the viewstate changes once the hyperlink has been clicked,
    > causing the Page_Load event of my user control to fire (which is what I
    > don't want). Is there any way to structure the hyperlink such that the
    > viewstate of my other user controls on the page do not change? If so, how

    do
    > I do this? If not, what other method could I use?
    >
    > Regards
    > John.
    >
    >
     
    David Waz..., Jul 6, 2003
    #2
    1. Advertising

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. Ben Rush
    Replies:
    2
    Views:
    574
    Ben Rush
    Dec 5, 2003
  2. Steph
    Replies:
    2
    Views:
    1,696
    heislord5
    May 11, 2011
  3. ujjc001
    Replies:
    0
    Views:
    1,399
    ujjc001
    Jul 27, 2005
  4. sck10
    Replies:
    6
    Views:
    957
    sck10
    Sep 1, 2006
  5. jonny
    Replies:
    4
    Views:
    390
    gnewsgroup
    Oct 12, 2007
Loading...

Share This Page