Results 1 to 6 of 6

Thread: new with asp.net

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166

    Question new with asp.net

    I began studying asp.net this week... after installing the framework and web-matrix on my computer i tried to some examples that were on the cd from the book i bought (asp.net unleashed). For some reason the view-state is not preserved when i submit... Dit i forget to configure something? Any help would be greatly appreciated.

    Code:
     <%@  Page %>
    <script runat="server">
    
        Sub Button_Click( s As Object, e As EventArgs )
           entries.innerHtml = "<hr>" & username.Value & "<p>" & comments.Value & entries.innerHTML
        End Sub
    
    </script>
    <html>
    <head>
        <title>Guestbook.aspx</title>
    </head>
    <body>
        <form runat="Server">
            <b>Username:</b> 
            <br />
            <input id="username" type="text" size="30" runat="Server" />
            <p>
                <b>Comments:</b> 
                <br />
                <textarea id="comments" rows="10" cols="60" runat="Server"></textarea> 
            </p>
            <p>
                <input type="submit" value="Add Comment" runat="Server" onserverclick="Button_Click" />
                <span id="entries" runat="Server">
                </span>
            </p>
        </form>
    </body>
    </html>
    never argue with an idiot, he will bring you down to his level and will beat you through experience

  2. #2
    Hyperactive Member
    Join Date
    Apr 2003
    Location
    Three Rivers, MI
    Posts
    354
    Is that code the source view from the browser or a cut and paste of the code from Web Matrix?

  3. #3
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    In your @ Page directive add EnableViewState="True"
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166

    Unhappy

    to answer bukhix question: webmatrix-code, the browser is only showing the fields...without text

    After enabling the viewstate explicitly (which i didn't think is neccesary???) nothing changes... The browser isn't showing any of the asp-controls like buttons or images or anything in all of the code-examples and when i make a page myself it's the same thing...

    any ideas?
    never argue with an idiot, he will bring you down to his level and will beat you through experience

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166

    Angry

    I think i found the source of the problem... I think it should be ok when i run the "\WINNT\Microsoft.NET\Framework\v1.0.3705\aspnet_regiis.exe" -i command...

    only problem: there is no such .exe in that folder nor on my computer...i'm really stuck here...
    never argue with an idiot, he will bring you down to his level and will beat you through experience

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2003
    Location
    Gent
    Posts
    166
    it seems that asp.net is not supported under nt4 ??? is this a secret?
    never argue with an idiot, he will bring you down to his level and will beat you through experience

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width