Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Identifier Expected error in ASP.NET!

Status
Not open for further replies.

z07924

IS-IT--Management
Feb 18, 2002
122
GB
void Page_Load()
{
sSql = " SELECT * FROM tblClient_Supervisor_List WHERE RepName ='" + Session["gUserID"] + "'";

OleDbConnection myConn = new OleDbConnection(strDSN);
OleDbCommand myCmd = new OleDbCommand(sSql, myConn);
OleDbDataReader dr = null;
myConn.Open();
recdr = myCmd.ExecuteReader();

With dlClientID;
.DataSource = recdr;
.DataTextField = "RepName";
.DataValueField = "ClientID";
.DataBind();
End With;
}

Here I am getting the error as "Identifier Expected".

I don't know, What is the problem is..
Compiler Error Message: CS1001: Identifier expected

In this line-- With dlClientID;
the error is coming.
Could you find any error, please let me know.

Thanks in Advance,
Laks



 
Is the semi-colon after With dlClientID a typo error while posting or is it what you have in your code? I am not a C# programmer but I beleive you dont need it there...

Hope this helps.
 
Thats what the code has. If I delete that secicolen, it is giving me some other error.
The error is given below,
;Expected.

It is giving semnicolen expected on the same line. Thats why I added a semicolen.

Is there any other solution to solve this problem?.

I am also new in C#. Please help out!

Thanks in Advance,
LAks

 
Thank you for your great co-operation. I already found the solution.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top