|
-
Feb 20th, 2004, 08:55 AM
#1
Thread Starter
Addicted Member
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
-
Feb 20th, 2004, 11:01 AM
#2
Hyperactive Member
Is that code the source view from the browser or a cut and paste of the code from Web Matrix?
-
Feb 20th, 2004, 12:25 PM
#3
Frenzied Member
In your @ Page directive add EnableViewState="True"
Being educated does not make you intelligent.
Need a weekend getaway??? Come Visit
-
Feb 23rd, 2004, 02:52 AM
#4
Thread Starter
Addicted Member
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
-
Feb 23rd, 2004, 05:26 AM
#5
Thread Starter
Addicted Member
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
-
Feb 23rd, 2004, 06:03 AM
#6
Thread Starter
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|