By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,854 Members | 869 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,854 IT Pros & Developers. It's quick & easy.

listbox.selecteditem.value

P: 15
In the below code, I am trying to redirect to another page, depending on the value of the selected item in the listbox;but I am getting the error :

"Cannot implicitly convert type'string ' to 'bool'

if (ListBox3.SelectedItem.Value = "Cno")
Response.Redirect("Contact.aspx");

May i know how can i correct it?
Sep 20 '07 #1
Share this Question
Share on Google+
1 Reply


ammoos
100+
P: 100
Please use "==" instead of "=" in your code

if (ListBox3.SelectedItem.Value == "Cno")
Sep 20 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.