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

Discussion in 'ASP .Net' started by AAaron123, Apr 28, 2009.

  1. AAaron123

    AAaron123 Guest

    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
     
    AAaron123, Apr 28, 2009
    #1
    1. Advertising

  2. 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.
     
    Nanda Lella[MSFT], Apr 28, 2009
    #2
    1. Advertising

  3. AAaron123

    AAaron123 Guest

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

    Thanks

    "Nanda Lella[MSFT]" <> wrote in message
    news:...
    > 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.
    >
     
    AAaron123, Apr 30, 2009
    #3
  4. <%...%> tags are called Code Render Blocks and <script
    runat="server"></script> are referred to as code declaration blocks.
    look here http://msdn.microsoft.com/en-us/library/2cy7sxha.aspx for more
    information.
    Code render blocks are not supposed to have a function or subroutine.


    --

    Thank You,
    Nanda Lella,
    http://www.ctrlf5.net

    This Posting is provided "AS IS" with no warranties, and confers no rights.
     
    Nanda Lella[MSFT], May 4, 2009
    #4
  5. AAaron123

    AAaron123 Guest

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

    Thanks




    "Nanda Lella[MSFT]" <> wrote in message
    news:...
    > <%...%> tags are called Code Render Blocks and <script
    > runat="server"></script> are referred to as code declaration blocks.
    > look here http://msdn.microsoft.com/en-us/library/2cy7sxha.aspx for more
    > information.
    > Code render blocks are not supposed to have a function or subroutine.
    >
    >
    > --
    >
    > Thank You,
    > Nanda Lella,
    > http://www.ctrlf5.net
    >
    > This Posting is provided "AS IS" with no warranties, and confers no
    > rights.
    >
     
    AAaron123, May 7, 2009
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ben Miller [msft]

    Re: Code Behind vs. no code behind: error

    Ben Miller [msft], Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    595
    Alphonse Giambrone
    Jun 28, 2003
  2. Paolo Pignatelli
    Replies:
    6
    Views:
    2,197
    Paolo Pignatelli
    Feb 21, 2005
  3. Hiten
    Replies:
    2
    Views:
    1,606
    Hiten
    Aug 23, 2006
  4. John

    Non-code behind to code behind

    John, Feb 19, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    491
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Feb 19, 2007
  5. Cubaman
    Replies:
    0
    Views:
    556
    Cubaman
    Oct 3, 2010
Loading...

Share This Page