I have a string being returned to my in my ascx file. I get access to it like this... <%# DataBinder.Eval(Container.DataItem, "RoomNumber") %>. This is pretty simple. I want to be able to take the value of "RoomNumber" and do a substring on it. So if RoomNumber returns "A1234," I want to be able to get "A" or "4" from this return value. How can I do this in C# inline in my ascx?
I know I can use <%= %> and <%# %>, but I am not clear on which ones to use at which occassions. I think I would need something to return "RoomNumber" followed by a .Substring(1,1) or something. Can anyone suggest something?
Thanks,
Alex