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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Beginner Question

Status
Not open for further replies.

jsiimml

Programmer
Feb 14, 2006
10
GB
Hi, I've been using asp for the last few years to do some sites and thought it was about time for an upgrade. I'm fine with the idea behind the event handlers and using the page_load handler. I've been doing specific if statements within the handler to change values in label fields but now I have a case where I wish to hide an entire row in a table.

I was thinking about setting a label field and then changing the entire contents in the page_load event handler but I didn't want to have the html code in the code behind file. My next option was to do the if statement around the tr tag but I thought the idea of asp.net was to seperate code from html. What other options do I have. Appreciate the help. Thanks
 
you could use

select case label.text
case whatever
do something
case something else
do something else
end select

if you have one ot two things the label could be then write an if statement. otherwise I would use select case.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top