By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,333 Members | 1,850 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,333 IT Pros & Developers. It's quick & easy.

Site works with Firefox, not with IE ( Response.Redirect )

P: n/a
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?

Mar 20 '06 #1
Share this Question
Share on Google+
15 Replies


P: n/a
Cool stuff! Works with FireFox and not with IE....
Do you have any sample code?

Regards,
Lars-Inge Tønnessen
Mar 20 '06 #2

P: n/a

Lars-Inge Tønnessen (VJ# MVP) wrote:
Cool stuff! Works with FireFox and not with IE....
Do you have any sample code?

Regards,
Lars-Inge Tønnessen


protected void btnDVD2_Click(object sender, EventArgs e)
{

Response.Redirect("dvd.aspx?dvd=" + txtSearch.Text);

}

txtSearch is a text box.
the page this is on has a frame redirect...

<BASE href="/" target="Results">
</BASE>

Mar 20 '06 #3

P: n/a
KBuser <Ky********@gmail.com> wrote:
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?


Well, it's hard to say given only the information that the "buttons do
not work". In what way do they not work? Do you get a browser request
at all? What happens? Can you give some sample code? Do you know
whether the issue is at the browser end or the server end?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 20 '06 #4

P: n/a
Jon wrote:
KBuser <Ky********@gmail.com> wrote:
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?


Well, it's hard to say given only the information that the "buttons do
not work". In what way do they not work? Do you get a browser request
at all? What happens? Can you give some sample code? Do you know
whether the issue is at the browser end or the server end?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too

It's client side that it fails, as the page works fine with one browser
and not another, as I've stated twice. Nothing happens, the page just
sits there (in Internet Explorer).

I'm not sure how I can be more clear here. I had a page so people could
query our database. I had a button and a text box. The queries and
searches worked fine on both browsers. I added a few buttons and create
the script behind them to pass the text box values to the proper page
with the correct query string.... The page works fine in Firefox,
however IE stopped working. So it must be something with
Reponse.Redirect and IE, no?

<%@ Page Language="C#" %>

<script runat="server">

protected void btnDVD2_Click(object sender, EventArgs e)
{

Response.Redirect("dvd.aspx?dvd=" + txtSearch.Text);

}

protected void btnComp_Click(object sender, EventArgs e)
{
Response.Redirect("company.aspx?co=" + txtSearch.Text);
}

protected void btnBrand_Click(object sender, EventArgs e)
{
Response.Redirect("brand.aspx?brand=" + txtSearch.Text);
}
protected void btnRate_Click(object sender, EventArgs e)
{
Response.Redirect("rate.aspx?mag=" + txtSearch.Text);
}

protected void btnMag_Click(object sender, EventArgs e)
{
Response.Redirect("magazine.aspx?mag=" + txtSearch.Text);
}
</script>

<html>
<head runat="server">
<title>Search Menu</title>
<BASE href="" target="Results">
</BASE>
</head>
<body bgcolor="inactiveborder">
<form id="form1" runat="server">
<div style="text-align: center">
<asp:TextBox ID="txtSearch"
runat="server"></asp:TextBox>&nbsp;<br />
<asp:Button ID="btnComp" runat="server" OnClick="btnComp_Click"
Text="Company" />
<asp:Button ID="btnBrand" runat="server" Text="Brand"
OnClick="btnBrand_Click" />
<asp:Button ID="btnDVD2" runat="server" OnClick="btnDVD2_Click"
Text="DVD" />
<asp:Button ID="btnRate" runat="server" Text="Rate"
OnClick="btnRate_Click" />
<asp:Button ID="btnMag" runat="server" Text="Magazine"
OnClick="btnMag_Click" /><br />
<span style="font-family: Courier New"><span style="font-size:
24pt"><span style="color: #00cc00">
<span style="color: #0033ff">Search</span>Mag</span><span
style="color: #0033ff"><span><span>Stats<span
style="font-size:
7pt">v.04</span></span></span></span></span></span></div>
</form>
</body>
</html>

Mar 20 '06 #5

P: n/a
This code + base is working on my computer using IE 6.
What IE version etc...Any plugins in IE etc...?

protected void Button1_Click(object sender, EventArgs e)
{
this.Response.Redirect("dvd.aspx?dvd=" + this.TextBox1.Text);
}

Regards,
Lars-Inge Tønnessen
Mar 20 '06 #6

P: n/a

Jon wrote:
KBuser <Ky********@gmail.com> wrote:
I recently developed an internal website with various queries against
our SQL server. I added buttons with Response.Redirect. These buttons
do not work with Internet Explorer, however when using Firefox the page
works flawless. Does anyone know why this is happening or how to fix it?


Well, it's hard to say given only the information that the "buttons do
not work". In what way do they not work? Do you get a browser request
at all? What happens? Can you give some sample code? Do you know
whether the issue is at the browser end or the server end?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


t's client side that it fails, as the page works fine with one browser
and not another, as I've stated. Nothing happens, the page just
sits there (in Internet Explorer).

I'm not sure how I can be more clear here. I had a page so people could
query our database. I had a button and a text box. The queries and
searches worked fine on both browsers. I added a few buttons and create
the script behind them to pass the text box values to the proper page
with the correct query string.... The page works fine in Firefox,
however IE stopped working. So it must be something with
Reponse.Redirect and IE, no?

<%@ Page Language="C#" %>

<script runat="server">

protected void btnDVD2_Click(object sender, EventArgs e)
{

Response.Redirect("dvd.aspx?dvd=" + txtSearch.Text);

}

protected void btnComp_Click(object sender, EventArgs e)
{
Response.Redirect("company.aspx?co=" + txtSearch.Text);
}

protected void btnBrand_Click(object sender, EventArgs e)
{
Response.Redirect("brand.aspx?brand=" + txtSearch.Text);
}

protected void btnRate_Click(object sender, EventArgs e)
{
Response.Redirect("rate.aspx?mag=" + txtSearch.Text);
}

protected void btnMag_Click(object sender, EventArgs e)
{
Response.Redirect("magazine.aspx?mag=" + txtSearch.Text);
}
</script>

<html>
<head runat="server">
<title>Search Menu</title>
<BASE href="" target="Results">
</BASE>
</head>
<body bgcolor="inactiveborder">
<form id="form1" runat="server">
<div style="text-align: center">
<asp:TextBox ID="txtSearch"
runat="server"></asp:TextBox>&nbsp;<br />
<asp:Button ID="btnComp" runat="server" OnClick="btnComp_Click"
Text="Company" />
<asp:Button ID="btnBrand" runat="server" Text="Brand"
OnClick="btnBrand_Click" />
<asp:Button ID="btnDVD2" runat="server" OnClick="btnDVD2_Click"
Text="DVD" />
<asp:Button ID="btnRate" runat="server" Text="Rate"
OnClick="btnRate_Click" />
<asp:Button ID="btnMag" runat="server" Text="Magazine"
OnClick="btnMag_Click" /><br />
<span style="font-family: Courier New"><span style="font-size:
24pt"><span style="color: #00cc00">
<span style="color: #0033ff">Search</span>Mag</span><span
style="color: #0033ff"><span><span>Stats<span
style="font-size:
7pt">v.04</span></span></span></span></span></span></div>
</form>
</body>
</html>

Mar 20 '06 #7

P: n/a

Lars-Inge Tønnessen (VJ# MVP) wrote:
This code + base is working on my computer using IE 6.
What IE version etc...Any plugins in IE etc...?

protected void Button1_Click(object sender, EventArgs e)
{
this.Response.Redirect("dvd.aspx?dvd=" + this.TextBox1.Text);
}

Regards,
Lars-Inge Tønnessen


IE version 6.0.2900.2180 with XP service pack 2

I accessed the site from another computer using firefox and it worked
fine. Then accessed from the same computer with IE and it doesn't work.
Thank you for trying that on your computer.

Mar 20 '06 #8

P: n/a
KBuser <Ky********@gmail.com> wrote:
Well, it's hard to say given only the information that the "buttons do
not work". In what way do they not work? Do you get a browser request
at all? What happens? Can you give some sample code? Do you know
whether the issue is at the browser end or the server end?
It's client side that it fails, as the page works fine with one browser
and not another, as I've stated twice.


That doesn't mean it's a client side problem though. There are any
number of things which could be server side problems but cause one
browser to fail and one to work.
Nothing happens, the page just sits there (in Internet Explorer).
Ah, finally, some information about what happens. You hadn't said what
had happened at all - only that it didn't work.
I'm not sure how I can be more clear here.


Well, the example should help. Having said which, it's not as short as
it could be - when giving examples it's worth making them as short as
possible. It would also help if you'd say which page you've given us
here, so we know whether the button is trying to redirect to the same
page or a different page.

I'll have a look at what you've given us when I've got some time
tonight.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 21 '06 #9

P: n/a

Jon wrote:
KBuser <Ky********@gmail.com> wrote:
Well, it's hard to say given only the information that the "buttons do
not work". In what way do they not work? Do you get a browser request
at all? What happens? Can you give some sample code? Do you know
whether the issue is at the browser end or the server end?


It's client side that it fails, as the page works fine with one browser
and not another, as I've stated twice.


That doesn't mean it's a client side problem though. There are any
number of things which could be server side problems but cause one
browser to fail and one to work.
Nothing happens, the page just sits there (in Internet Explorer).


Ah, finally, some information about what happens. You hadn't said what
had happened at all - only that it didn't work.
I'm not sure how I can be more clear here.


Well, the example should help. Having said which, it's not as short as
it could be - when giving examples it's worth making them as short as
possible. It would also help if you'd say which page you've given us
here, so we know whether the button is trying to redirect to the same
page or a different page.

I'll have a look at what you've given us when I've got some time
tonight.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


Thank you Jon. The page I showed was the menu (top row) of the
frameset. The redirect (Response) is directed at the 2nd frame. Both of
these aspx pages are on default.htm.
This is the code behind default.
<html>
<head>
<title>Search</title>
</head>

<FRAMESET COLS="100%">
<FRAMESET ROWS="16%,84%" border="0">
<FRAME SRC="menu.aspx" name="Menu" scrolling="no" noresize>
<FRAME SRC="results.aspx" name="Results">
</FRAMESET>

</FRAMESET>
</html>

Results.aspx is a place holder with "no code".

I appreciate all the help.

Mar 21 '06 #10

P: n/a
Oops... I forgot to mention these, the fact that my sample code worked
for Lars makes me think one of these lines might be the issue.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

and
<html xmlns="http://www.w3.org/1999/xhtml" >

Mar 21 '06 #11

P: n/a
I have a feeling this might work, trying it now...
http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd

Mar 21 '06 #12

P: n/a
KBuser <Ky********@gmail.com> wrote:
Thank you Jon. The page I showed was the menu (top row) of the
frameset.


Okay - so the first thing to do is try to reproduce the problem outside
frames. Create the shortest page you can that still demonstrates the
problem. Get rid of things one at a time until the problem goes away -
or start from scratch. Once you've got that minimal example, the cause
of the problem may well be apparent - and if it's not, it will be
*much* easier for others to help you.

This is a great strategy for problem-solving in general, not just
asp.net problems.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Mar 21 '06 #13

P: n/a
I have the same problem:
I have big asp.net , c# project with many buttons and image buttonsthat
suddenly stop firing, when you click on button form -nothings happen.
It is a project more than 6 months old and all the time so far all
buttons worked just fine, but now...not

What strange that in Firefox they are still work fine, but not in IE.

When I create another project buttnons work without problems so itseems
my project is somehow screwed up.

I tried move project to another computer - same thing.

I tried to reinstall framework (aspnet_regiis.exe), it didn't help

Anybody knows solution ???

Thanks


*** Sent via Developersdex http://www.developersdex.com ***
Mar 31 '06 #14

P: n/a
Fixed! It was one problematic javascript on my page that prevent page
to be rendered in IE properly.When I remove that javascript everything
went smoothly.

Anybody with same problem: pay attention on javascript on your pages

Regards;

*** Sent via Developersdex http://www.developersdex.com ***
Apr 3 '06 #15

P: n/a
It seems to be this piece of code that is causing the issue for me.
<BASE href="" target="Results">
</BASE>

Apr 9 '06 #16

This discussion thread is closed

Replies have been disabled for this discussion.