473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

LinkButtons and PostBacks

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 '06 #1
5 1686
<na**********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
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 '06 #2
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:
<na**********@gmail.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
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 '06 #3
<na**********@gmail.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...
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 '06 #4
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:
<na**********@gmail.comwrote in message
news:11**********************@j72g2000cwa.googlegr oups.com...
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 '06 #5
<na**********@gmail.comwrote in message
news:11**********************@j44g2000cwa.googlegr oups.com...
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...
Dec 13 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Linda | last post by:
Hi, How do I dynamically add linkbuttons and wire them to same event? I am able to add linkbuttons but they do not fire the event. Does anybody have a working sample? Many thanks, Linda
0
by: Lucas Tam | last post by:
Hi all, I'm implementing the IPostBackDataHandler interface, and have got it to work somewhat. However, I can't seem to capture any values for Linkbuttons. Do linkbuttons submit any type of...
5
by: Dave | last post by:
(Second Try) Greetings, I have an asp.net web application that utilizes a User Control at the top of the page. My User Control contains a Server Control menu which will require postbacks. ...
6
by: Andrew Robinson | last post by:
I have a page that contains a number of link buttons that are used for making selections. I load my LinkButtons during the Page_PreInit event and they render fine but then I need to make a change...
0
by: gregfocker | last post by:
I installed the new RTM version of ASP.NET 2.0 AJAX Extensions 1.0 released on Tuesday (1/23). I made the required changes to the web.config file to go from the RC version to the RTM version. ...
1
by: Kursat | last post by:
Hi, I have a question about Ajax postbacks : - Does ASP.NET process multiple UpdatePanel postbacks in single thread when two or more different update panel postbacks occur at the same time for...
4
by: Nathan Sokalski | last post by:
I have 2 private variables in my class that I need to remember the values of between postbacks (or actually callbacks, since I am using AJAX). I want to avoid using session variables, if possible....
1
by: jack | last post by:
Hi folks, I got a custom control, in which it's placed inside the UpdatePanel. The control contains some LinkButtons which post back to the same page. Actually, when these LinkButtons are clicked,...
8
by: Hamayun Khan | last post by:
Hi I have created linkbuttons dynamically using the below code Sub createlinkbutton(ByVal commandtext As String, ByVal Cmdarg As String, ByVal pane As Panel, ByVal count As Int32) Dim i =...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.