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> <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>