.NET Framework - Visual Basic dotnet - buttons on a web page
Asked By Morto
12-Feb-08 04:08 PM
I added two buttons to a web page. One has 'Causes Validation' set to True -
the othe to false.
When I click the button set to 'Causes Validation' - the expected validation
messages appear.
When I click the button with no validation - nothing happens.
What I expected was that the "Response.Redirect" line would be fired.
Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnCancel.Click
Response.Redirect("Default.aspx")
End Sub
If I set a stop point at the subroutine - it is ignored.
Any suggestions as to what I am missing?
System.EventArgs
(1)
EventArgs
(1)
Response.Redirect
(1)
System.Object
(1)
Validation
(1)
Visual
(1)
Redirect
(1)
BtnCancel.Click
(1)
dotNetDav replied...
Did you double check that CausesPostback is set to True?
David
======================================
David McCarter [Microsoft MVP]
www.dotNetTips.com
David McCarter''''s .NET Coding Standards available at:
http://www.cafepress.com/geekmusicart.1654787045
in the page. . .NET Framework Protected Sub CheckBox1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged Response.Redirect("Ativ_usuarios.aspx?check = " & CheckBox1.Checked) End Sub Dont work . . . = ( . . . anyone can help me ? VB.NET Discussions System.EventArgs (1) EventArgs (1) Response.Redirect (1) CheckedChanged (1) Redirect (1) Check (1) Ativ (1) Checkbox (1) What do you
with parameter 'False' and 'True'. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim a As Integer a = 5 If a = 5 Then Dim jv As String jv = "" _ & " alert(this is ok);" _ & "" Response.Write(jv) Response.Redirect(next.aspx Response.Redirect(next.aspx", False) 'Response.Redirect(next.aspx", True) End If End Sub Thanks Jan ASP.NET Discussions POST (1) EventArgs
Response.Redirect problem from remote machine .NET Framework I am a newbie to asp.net but have aspx) with a single button which then redirects to a second page (MemberReport.aspx) using Response.Redirect. I have the code working on a remote machine as localhost and the same code The code is very simple: Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSubmit.Click Response.Redirect("MemberReport.aspx?MemberID = 10058") End Sub (note I can open the target page directly with
get to the other page: Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged Response.Redirect("details1.aspx?Titleid = " & GridView1.SelectedValue) End Sub This only gives me the TitleId. When I tried then wrote this but getting incorrect string format: Response.Redirect("details1.aspx?TitleID = " & Title & "&description = I have three text boxes on the other page to in the text boxes on the details1.aspx page? ASP.NET Discussions GridView1.SelectedValue (1) System.EventArgs (1) EventArgs (1) SelectedIndexChanged (1) Response.Redirect (1) Site (1) Redirect (1) SelectCommand (1) Try
it still happens I do not know what this means, thank you your help. {Name = "EventArgs" FullName = "System.EventArgs"} [System.RuntimeType]: {Name = "EventArgs" FullName = "System.EventArgs"} base {System.Reflection.MemberInfo}: {Name = "EventArgs" FullName = Assembly: {mscorlib, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089} AssemblyQualifiedName: "System.EventArgs, mscorlib, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089" Attributes: Public | Serializable | BeforeFieldInit