LinkButtons and PostBacks

Discussion in 'ASP .Net' started by narmathabala@gmail.com, Dec 13, 2006.

  1. Guest

    Hi,

    I have a set of linkbuttons postback to the same page using
    Response.Redirect().
    It works great with FF but not on IE (surprising). On IE, the PostBack
    does not work. Am I missing anything here? I work with .Net 2.0.
    Could anyone please, let me know how to work around this?

    Page_Load()
    {
    if(!isPostBack)
    {
    if(Request.Querystring["action"] == "click1")
    DoClick1();
    if(Request.Querystring["action"] == "click2")
    DoClick2();
    }
    }
    LinkButton1_Click()
    {
    Response.Redirect("main.aspx?action=click1");
    }

    LinkButton2_Click()
    {
    Response.Redirect("main.aspx?action=click2");
    }

    Thanks in advance,
    Narmatha
     
    , Dec 13, 2006
    #1
    1. Advertising

  2. Mark Rae Guest

    <> wrote in message
    news:...

    > It works great with FF but not on IE (surprising).


    What does that mean, exactly...?

    > On IE, the PostBack does not work.


    In what way does it "not work" - when you step through the code, what is the
    difference in IE and FireFox...?
     
    Mark Rae, Dec 13, 2006
    #2
    1. Advertising

  3. Guest

    Hi Mark,

    When I step thro the code, the LinkButton1_Click() and
    LinkButton2_Click() works.
    When I deploy this on the server, the LinkButton postbacks dont seem to
    work in IE. It does work in FireFox.
    Please check this link in FF and IE 6, you will notice the difference
    http://rapid.bdiamond.biz/home/test.aspx

    This is the code snippet
    protected void Page_Load(object sender, EventArgs e)
    {
    if (!IsPostBack)
    {
    if (Request.QueryString["action"] == "click1")
    MultiView1.ActiveViewIndex = 0;
    if (Request.QueryString["action"] == "click2")
    MultiView1.ActiveViewIndex = 1;
    }
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
    Response.Redirect("~/home/test.aspx?action=click1");
    }
    protected void LinkButton2_Click(object sender, EventArgs e)
    {
    Response.Redirect("~/home/test.aspx?action=click2");
    }

    Thanks,
    Narmatha

    Mark Rae wrote:
    > <> wrote in message
    > news:...
    >
    > > It works great with FF but not on IE (surprising).

    >
    > What does that mean, exactly...?
    >
    > > On IE, the PostBack does not work.

    >
    > In what way does it "not work" - when you step through the code, what is the
    > difference in IE and FireFox...?
     
    , Dec 13, 2006
    #3
  4. Mark Rae Guest

    <> wrote in message
    news:...

    > Please check this link in FF and IE 6, you will notice the difference
    > http://rapid.bdiamond.biz/home/test.aspx


    In IE, when I click the first LinkButton the text beneath says view1 and
    when I click the second it says view2.

    FireFox does exactly the same - I even tried it on my Mac - no difference...
     
    Mark Rae, Dec 13, 2006
    #4
  5. Guest

    Beats me!
    Does not work for me. It could be of great help if you could throw more
    light on this behavior.
    Is it something about the IE setting?

    Mark Rae wrote:
    > <> wrote in message
    > news:...
    >
    > > Please check this link in FF and IE 6, you will notice the difference
    > > http://rapid.bdiamond.biz/home/test.aspx

    >
    > In IE, when I click the first LinkButton the text beneath says view1 and
    > when I click the second it says view2.
    >
    > FireFox does exactly the same - I even tried it on my Mac - no difference...
     
    , Dec 13, 2006
    #5
  6. Mark Rae Guest

    <> wrote in message
    news:...

    > Beats me!
    > Does not work for me. It could be of great help if you could throw more
    > light on this behavior.
    > Is it something about the IE setting?


    Well, the only thing I can think of that might explain it would be if you
    had disabled JavaScript for some reason...
     
    Mark Rae, Dec 13, 2006
    #6
    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. Vidar Petursson

    Re: LinkButtons and MouseOver

    Vidar Petursson, Jul 8, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    1,256
    sramruttun
    Jul 9, 2003
  2. Lucas Tam

    LoadPostData and LinkButtons

    Lucas Tam, Aug 18, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    324
    Lucas Tam
    Aug 18, 2003
  3. JJ
    Replies:
    1
    Views:
    473
    =?Utf-8?B?RG90TmV0SmVyb21l?=
    Feb 26, 2005
  4. Replies:
    1
    Views:
    405
    David Wier
    Sep 19, 2006
  5. Replies:
    0
    Views:
    451
Loading...

Share This Page