Hi,
I have just started using .Net . In VB 6.0 the text case of a variable would change automatically based on the declaration.
This doesn't seem to be the case in .Net. Is that correct ? Do I have check/uncheck some options in the menu to make the software do this ?
ThanksMine does when I use the Code Behind section of ASP.NET. If your just putting the ASP.NET code on the aspx page itself it may not correct the "Case" of the variables and stuff. I could be wrong, but i'm pretty sure that is your problem.
How do I use the code-behind section ?
Thanks
If your using the Visual Studio.Net IDE then to get at the code behind just double click the form like you would in VB6.
There maybe a way to use Code-Behind if your not using the VS.net IDE but I don't know how to do that.
Showing posts with label based. Show all posts
Showing posts with label based. Show all posts
Wednesday, March 28, 2012
Monday, March 26, 2012
Text if not null
I want to display text in a datagrid based on if the text pulled in from the database is null or not.
Below I can change the backcolor if its not blank but I want to change the text :
Put "Confirmed" if it is not null, and "Not Confirmed" if it is null.
Dim conf As String
conf = Convert.ToString(DataBinder.Eval(e.Item.DataItem, "confirm_id"))If conf <> "" Then
e.Item.BackColor = System.Drawing.Color.AliceBlueEnd If
How can I do this?Try (3 is just an example, you'll have to use the right column index)
e.Item.Cells[3].Text = "Confirmed"
Regards
Fredr!k
I got the following error:
'Cells' is not a member of 'System.Web.UI.WebControls.DataListItem'.
I am using a datalist is there a way of doing this with a datalist?
Subscribe to:
Posts (Atom)