That's not a tick mark √. It's the square root sign, and its ASCII code is actually 8730. You can get it to display using this HTML entity value: √
First of all make sure you have nvarchar datatype in your db column to store the tick mark. Then you can simply bind the drop down with the tables column using SqlDataSource. It will display the tick sign correctly along with any other text data.
I have tested it, it is working fine.
Please Mark As Answer if it helped.
MCPD ASP.NET 4.0 and 3.5, MCTS WSS, MOSS, SharePoint 2010, MCT
Microsoft Community Contributor Award 2011
nicklibee
Member
650 Points
674 Posts
Displaying a tick mark in drop down list
Jan 15, 2011 06:10 AM|LINK
All,
I have a tick mark(ascii character 251) in database, how do i display it in a drop down list in vb.net?
Thanks
Nick
Mikesdotnett...
All-Star
154852 Points
19855 Posts
Moderator
MVP
Re: Displaying a tick mark in drop down list
Jan 15, 2011 06:58 AM|LINK
That's not a tick mark √. It's the square root sign, and its ASCII code is actually 8730. You can get it to display using this HTML entity value: √
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
nicklibee
Member
650 Points
674 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:05 AM|LINK
Can you please provide some code for that?
I tried that but cant get the intended output
nick
adeelehsan
All-Star
18223 Points
2725 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:07 AM|LINK
Hi
First of all make sure you have nvarchar datatype in your db column to store the tick mark. Then you can simply bind the drop down with the tables column using SqlDataSource. It will display the tick sign correctly along with any other text data.
I have tested it, it is working fine.
MCPD ASP.NET 4.0 and 3.5, MCTS WSS, MOSS, SharePoint 2010, MCT
Microsoft Community Contributor Award 2011
nicklibee
Member
650 Points
674 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:10 AM|LINK
yes the datatype is nvarchar and i did bind it but when i run the page iam getting a aquare.
nick
hj
Contributor
2536 Points
552 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:19 AM|LINK
hello
is ascii character is equal to check mark ??
check the output source code to make sure of that.
nicklibee
Member
650 Points
674 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:26 AM|LINK
Yes, you are correct,in sqldatasource the tick sign is shown develppment environment but when i run the application its showing a square symbol...
thanks
nick
nicklibee
Member
650 Points
674 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 07:33 AM|LINK
any idea how to resolve this???
thanks
nick
Mikesdotnett...
All-Star
154852 Points
19855 Posts
Moderator
MVP
Re: Displaying a tick mark in drop down list
Jan 15, 2011 08:03 AM|LINK
Yes - change whatever tick mark you have in SQL Server to the HTML entity as I said before.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
nicklibee
Member
650 Points
674 Posts
Re: Displaying a tick mark in drop down list
Jan 15, 2011 08:11 AM|LINK
I DID THAT BUT WHEN I RUN THE PAGE IT IS DISPLAYING √ IN DROP DOWN.
Nick