Hi Experts,
I am trying to authenticate users through Soap headers
so that the user can consume a small web service by executing
an SQl query on the .aspx file.
While I am trying to run the code written below , I get
the server tag is not well formed error. I think the error is something to do with the <asp:DataGrid.... on line 43.
Can U give me hint. Please help,
Thank you.
...............
The error is.
...............
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 41: <asp:Button id="btSubmit" runat="server" text="Submit" Onclick="Submit" /><p>
Line 42:
Line 43: <asp:DataGrid id="DataGrid1" runat="server"
Line 44: BorderColor="Black"
Line 45: GridLines="Vertical"
Source File: c:\inetpub\wwwroot\AspNET\secureDatabaseService.as px Line: 43
............
the code I have used is
.................
<%@ Page Language="
VB" %>
<%@ Import NameSpace="System.Data" %>
<script runat="server">
sub Submit(Sender as Object , e as EventArgs)
dim objService as new DATABASER.Clients.SecureDatabaseService
dim sHeader as new DATABASER.Clients.Authenticator
dim objDS as new DataSet
sHeader.UserName = tbUser.Text
sHeader.Password = tbPass.Text
objService.Authenticator = sHeader
try
objDs = objService.SelectSQl(tbQuery.Text)
if objDs is Nothing Then
Response.Write("Invalid username or Password")
else
DataGrid1.DataSource = objDS
DataGrid1.DataMember = "tblUsers"
DataGrid1.Databind()
end if
catch ex as exception
Response.Write("Invalid username and password")
end try
end sub
</script>
<html><body>
<form runat="server">
Username:
<asp:TextBox id="tbUser" runat="server"/><br>
Password:
<asp:TextBox id="tbPass" runat="server" TextMode="Password"/><p>
Enter a Query:
<asp:TextBox id="tbQuery" runat="server"/>
<asp:Button id="btSubmit" runat="server" text="Submit" OnClick="Submit"/><p>
<asp:DataGrid id="DataGrid1"
runat="server" BorderColor="black"
GridLines="Vertical" cellpadding="4"
cellspacing="0" width="100%"
Font-Name="Arial" Font-Size"="8pt"
HeaderStyle-BackColor="#cccc99"
ItemStyle-BackColor="#ffffff"
AlternatingItemStyle-BackColor="#cccccc" />
</form>
</body></html>
What is wrong on line 43????????????
Thanks