this will nt work if the domain of email has word called "Email"..for example if i search email@example.com it wont detect from
my database.but it works all other emails like these...firstname.lastname@example.org,email@example.com,firstname.lastname@example.org
I have already looked at the maintain scroll bar position and this only works on the browser scroll bar and not on asp:panel. Plus I actually have a number of panels which could all be in different positions, which is why I need to use JS and query strings
I want to change the forecolor of a label in a gridview I have, depending on the text in that label.
I can't access the label by the ID in the code-behind to get the properties.
The label is part of templatefield:
Thanks for all your help.
I have one question, since I am trying to figure out the color of the label in the page_load event, is there anyway how I can assign the color depending from the text in that label?
Do you understand the page life cycle? Read about it here[^].
In your page load event you want to set the DataSource property of your grid and call DataBind. Hopefully in your init method you setup an item data bound event handler. When DataBind is called, for each row being added to the gridview your data bound event handler will be called. There you set your colors. After all of that is done, Render gets called for the page which generates all the HTML from your page and code which gets sent to your user's browser.
Don't blame me. I voted for Chuck Norris.
Last Visit: 31-Dec-99 18:00 Last Update: 25-Jul-21 4:04