Wow. I couldn't have asked for a more detailed answer. Thanks so much! --Keith
SilentSeraph
Posts
-
Multiple Child Attributes -
Bug in TextBox control ?Ah! I made this mistake, too, until I stumbled across the answer. Whenever you are making your changes, you most normally have some type of submit button, I'm sure. So... You are expecting that the data the user inputs is going to be in the ViewState, and will stay in the textbox that the user input data into after he/she submits. Well, a Page_Load happens _every_ time the webpage refreshes, not just the very first time the particular application loads. So instead of doing just: TextBox1.Text="initialdata"; You should check to see whether or not the page is being posted back to itself, or in other words, whether or not the user just clicked a button to load the page, instead of just surfing to the page. You can do so by doing this in your Page_Load handler: If(!isPostBack()) { TextBox1.Text="initialdata"; } This way, the page will only initialize the text property when isPostBack returns false (which would be when the visitor hit the page for the very first time). Hope that helps! --Keith
-
get session variablesNot too sure if this is very helpful for you or not, but could you not do a for loop through the entire Session.Keys collection? Like so: For(i=0;i<=Session.Keys.Count - 1;i++) { Response.Write(Session.Keys[i].ToString()); } You can get the names of each one that way. I would probably store the names into another array, and iterate through them like that, but... that's just me. Hope this helped! --Keith
-
Multiple Child AttributesI found an article on MSDN that demonstrates how to parse child xml elements as a controls attributes and properties, like so: Here's the url for that: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconparsechildrenattributesample.asp My code is nearly identical to this, except I would like to be able to do multiple child attributes, like so: Is there any way to do this, or , perhaps someone might have a link that might explain how to do so? Thanks, --Keith
-
Custom Web ControlHey everyone. I'm rather new here, so if I make any mistakes or violate etiquette, then I'd like to apologize in advance. My question is rather simple, but it seems the answer isn't, and it's difficult to phrase the question at all without an example. I've been google searching for the past two hours, and since I saw that most of the articles came from here, I figured I'd swing this one by everyone here. Basically, I would like to have items in my webcontrol, much like a datagrid does. For example... Thanks in advance for your patience and time