Do breakpoints work when the code behind is included in the aspx file

  • Thread starter Thread starter AAaron123
  • Start date Start date
A

AAaron123

I'm having a problem getting

onclick="window.location.href...

to open a page.

The aspx file contains both the XHTML andthe VB script.

The file begins as follows:



<%@ Page Language="VB" MasterPageFile="~/Main.master" Title="Untitled Page"
AutoEventWireup="false" %>

<script runat="server">




Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles Me.Load

If Not IsPostBack Then

....



I put a break point on the If but it never gets there.

Now I'm wondering if breakpoints work when the code behind is included in
the aspx file rather than in a aspx.vb file.

Do they?



Thanks
 
Instead of using <script runat="server"> use the server code tage <% %>

Meaning, you should use somethig like

<%
Protected Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs)
Handles Me.Load

If Not IsPostBack Then

...

%>

--

Thank You,
Nanda Lella,
http://www.ctrlf5.net
This Posting is provided "AS IS" with no warranties, and confers no rights.
 
I tried to look that up but can't find any documentation.
How does <% %> differ from <script runat="server"> ?

Thanks
 
I often noticed that a problem looking things up is often stems from not
knowing the correct terms.

Thanks
 
Back
Top