LinkButtons and PostBacks

  • Thread starter Thread starter narmathabala
  • Start date Start date
N

narmathabala

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
 
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
 
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?
 
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...
 
Back
Top