by Tim
7. October 2011 09:14
Looping through a particular set of server controls is quite straight forward, especially if you use group naming conventions.
For example, I have three file upload controls on my page that I want to loop through. I assign the ID names as follows:
pictureFileUpload1 pictureFileUpload2 pictureFileU...
[More]
by Tim
15. February 2011 16:31
The key to understanding how to pass data between User Controls lies in the Page Life cycle. Here is a snippet of the Page Life Cycle that we can reference for the following task:
Page: Load
Control: DataBind
Control: Load
Page: EnsureChildControls
Page: LoadComplete
Page: EnsureChildControl...
[More]
by Tim
31. August 2010 16:58
Sometimes, just when you think you've got it all wrapped-up, there comes an unexpected oversight. In my GridView, I have a hyperlink column - I want the NavigateUrl to point to Google Translate and populate a text area with a dynamic keyword: For example:
<asp:TemplateField>
<ItemTe...
[More]
by Tim
14. July 2010 11:06
Lately, I ran into the old gem of extracting numbers from a string. I needed to do this because I couldn't get the number back from the database table but I could see the number in a the product title. Here is a code snippet in C# (using regular expressions) that works quite nicely. Any number of te...
[More]