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

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
 
N

Nanda Lella[MSFT]

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

AAaron123

I tried to look that up but can't find any documentation.
How does <% %> differ from <script runat="server"> ?

Thanks
 
A

AAaron123

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

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,034
Messages
2,570,356
Members
47,002
Latest member
RobertoLip

Latest Threads

Top