Click here to Skip to main content
15,906,645 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi the following code gives error
Parser Error Message: The server tag is not well formed.
Basically the problem is when i added email="Session[email]" there is some error in it. Any ideas how to fix it? Thanks

<asp:sqldatasource id="SqlDataSource1" runat="server" connectionstring="<%$ ConnectionStrings:ConnString %>"

selectcommand="SELECT * FROM [drpdwn] where email="Session[email]""
onselecting="SqlDataSource1_Selecting1" >
Posted
Updated 14-Nov-11 23:25pm
v6
Comments
thatraja 15-Nov-11 5:18am    
what's the error message? mention that always in your questions.

Syntax for SQL Select with where.

SQL
SELECT column_name(s)
FROM table_name
WHERE column_name operator value;

//your query should be like below

select * from [dp] where email = session;


follow the link to learn more basics...

http://www.w3schools.com/sql/sql_where.asp[^]


mark as answer if solves your problem, it motivates :)
 
Share this answer
 
v2
Check ur connection string

selectcommand="SELECT * FROM [drpdwn] where email='Session[email]'"
onselecting="SqlDataSource1_Selecting1" >

check this
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900