Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Debugging a VB.Net web form
Message
 
À
01/04/2002 20:08:49
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00639690
Message ID:
00639909
Vues:
23
>>>Are you sure its running?
>>Yes, IE opens and displays the ASPX page.
>
>Strange. I have a Web Form with this codebehind:
>
>
Public Class WebForm1
>    Inherits System.Web.UI.Page
>    Protected WithEvents Button1 As System.Web.UI.WebControls.Button
>    Protected WithEvents Label1 As System.Web.UI.WebControls.Label
>
>#Region " Web Form Designer Generated Code "
>
>    'This call is required by the Web Form Designer.
>    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
>
>    End Sub
>
>    Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init
>        'CODEGEN: This method call is required by the Web Form Designer
>        'Do not modify it using the code editor.
>        InitializeComponent()
>    End Sub
>
>#End Region
>
>    Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
>        'Put user code to initialize the page here
>        Me.Label1.Text = "Page"
>    End Sub
>
>    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
>        Me.Label1.Text = "Button"
>    End Sub
>End Class
>
>I put a breakpoint (big red dot in the left hand gray area) on the two Me.Label1.Text lines, and VS.NET stops all execution right there and waits.
>
>How do you run the page? I hit "F5" when I'm in VS and it runs with debugging. If you run it by navigating to the URL, or some other way without running it from VS, it won't stop at the breakpoints.

Hi Mike,

I have the same code in the "#Region" section.

I run the page by pressing F5 or pressing the 'play' button. I just added a line of code as the first line in the form load event:
Me.Button1.Text = "Test"
With the breakpoint set on this line, I pressed F5. IE opened and displayed the page with the caption on button1 changed to "Test" - yet the program did not stop at the breakpoint. This is a weird one.

Al
Al Williams

Anola MB, CANADA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform