Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS1026: ) expected
Source Error:Line 9
Line 7: <script runat="server">
Line 8:
Line 9: Sub OKButton_Click(Sender As Object, E As EventArgs)
Line 10: If UserID.Text = "Homer" And Password.Text="Homer" Then
Line 11: Response.Redirect("Database.aspx.?")
but i can't see what the problem is?
Thanksits ok ive sorted it now.
Thanks
If (UserID.Text = "Homer") And (Password.Text="Homer") Then
.....
try it this way. if it didn't work show us ur whole method.
thought i had sorted it, ive tried it your way and i still get the same error back
Thanks ive tried this but im getting the same error back, works fine on localhost but not on the server.
?
Thanks
Hello, can u post more code please, if u say it works fine on localhost and not on server, there must be something in ur web.config or in ur code, post some code so that all can see it and help you more.
<html>
<head>
<title>Online Self Assessment</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="http://links.10026.com/?link=css/corporate1.css" type="text/css">
</head>
<script runat="server">
Sub OKButton_Click(Sender As Object, E As EventArgs)
If UserID.Text = "Homer" And Password.Text="Homer" Then
Response.Redirect("database.aspx?")
Else Message.Text = "no entry"
End If
End Sub
</script
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="750" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td width="66"><img src="http://pics.10026.com/?src=images/buttontop1.gif" width="66" height="33"></td>
<td bgcolor="#539DDC" width="100">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Welcome</font></div>
</td>
<td width="69"><img src="http://pics.10026.com/?src=images/buttontop2.gif" width="69" height="33"></td>
<td bgcolor="#539DDC" width="130">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">To
</font></div>
</td>
<td width="64"><img src="http://pics.10026.com/?src=images/buttontop3.gif" width="64" height="33"></td>
<td bgcolor="#539DDC" width="110">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Online</font></div>
</td>
<td width="66"><img src="http://pics.10026.com/?src=images/buttontop4.gif" width="66" height="33"></td>
<td bgcolor="#539DDC">
<div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Self
Assessment</font></div>
</td>
<td width="21"><img src="http://pics.10026.com/?src=images/buttontop5.gif" width="21" height="33"></td>
</tr>
</table>
</td>
</tr>
<tr
<td><img src="http://pics.10026.com/?src=images/corporate1.gif" width="750" height="30"></td>
</tr>
<tr>
<td>
<table width="750" cellspacing="0" cellpadding="0">
<tr>
<td width="550"><img src="http://pics.10026.com/?src=images/logo.gif" width="550" height="83"></td>
<td bgcolor="#E9B841">
<table cellspacing="0" cellpadding="3" align="center">
<tr>
<td>
<div align="center">
<form runat="server">
User ID
<asp:textbox id="UserID" runat="server" /><br>
Password
<asp:textbox id="Password" runat="server"
textmode="Password"/><br><br>
<asp:button text="OK"
onclick="OKButton_Click" runat="server"/><br>
<asp:label id="Message" runat="server"/>
</form
hope this helps
Hello, have u added <@.Page ... /> ? at the beginning of ur page ? i don't see any wrong with ur page !!!
and try to put this
<script runat="server">
Sub OKButton_Click(Sender As Object, E As EventArgs)
If UserID.Text = "Homer" And Password.Text="Homer" Then
Response.Redirect("database.aspx?")
Else Message.Text = "no entry"
End If
End Sub
</script>
above the <html
i mean
<@.Page .... />
<script ...>
...
..
</script>
<html>
...
</html
try these and tell me what happens
Looks like you are using wrong compiler. "CS1026" is C# error but your server side code is Vb.Net.
hummm but this is written in vb.net ?
its working now thanks you so much haidar_bilal your the best programmer ever and i think i love you.
;-)
Did it work with you ??
So happy for you.
May Good Luck be with you always !!!!!!!
0 comments:
Post a Comment