<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

Looping Through Server Controls

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]

Tags: ,

ASP.NET | C#

Passing Data Between User Controls

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]

Tags: ,

ASP.NET | C#

Formatting Strings onRowDataBound

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]

Tags: ,

ASP.NET | C#

Extracting numbers from a string in C#

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]