1 Replies - 519 Views - Last Post: 17 December 2009 - 12:07 PM Rate Topic: -----

#1 apenax5  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 19-September 09

redirection problem

Posted 17 December 2009 - 11:01 AM

can anyone point me in the right direction with thies problem that i am having with redirection
thie following is my Button3 event
 protected void Button3_Click(object sender, EventArgs e)
	{
		Response.Redirect("HTSearch.aspx?id=" + TextBox3.Text);
	}



but when i run it and type in hello in the textbox this is what it sends

http://localhost:55668/oracle2/HTSearch.aspx?TextBox3=hello&Button3=Search


instead of

http://localhost:55668/oracle2/HTSearch.aspx?hello



here is a copy of my default.aspx

<span class="style2">Search Hot Topics</span><br />
<form action="HTSearch.aspx" method="get">
<asp:TextBox ID="TextBox3" runat="server" EnableViewState="false"></asp:TextBox>
<asp:Button ID="Button3" runat="server" Text="Search" onclick="Button3_Click" />
</form>


This post has been edited by apenax5: 17 December 2009 - 11:29 AM


Is This A Good Question/Topic? 0
  • +

Replies To: redirection problem

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: redirection problem

Posted 17 December 2009 - 12:07 PM

why are you doing this?

<form action="HTSearch.aspx" method="get">



ASP.Net doesn't use that. That could be causing a problem, because your code looks fine.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1