Reset all controls of a web form in C#

using System; using System.Data; using System.Configuration; using System.Linq; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using <a style="text-decoration: none;color: inherit;cursor: default" href="http://viagraonline-4rxonlinestore.com" rel="nofollow">can you buy viagra at walmart</a>  System.Web.UI.WebControls.WebParts; using System.Xml.Linq; using System.Text.RegularExpressions; <a style="text-decoration: none;color: inherit;cursor: default" href="http://canadian-pharmacyrxbest.com">northern lights canada pharmacy</a>  using System.Globalization; using System.Collections.Generic; /// <a style="text-decoration: none;color: inherit;cursor: default" href="http://genericviagra-onlinerxstore.com">viagra other uses</a>  <summary> /// Summary description for Constants_Audit /// </summary> public class Constants_Audit { public Constants_Audit() { // // TODO: Add constructor logic here // } public static void ResetFields(ControlCollection pageControls) { foreach (Control contl in pageControls) { string strCntName = <a style="text-decoration: none;color: inherit;cursor: default" href="http://cialisonline-bestrxstore.com" rel="nofollow">cialis order online</a>  (contl.GetType()).Name; switch (strCntName) { case "TextBox": TextBox tbSource = (TextBox)contl; tbSource.Text = ""; break; case "RadioButtonList": RadioButtonList rblSource = <a style="text-decoration: none;color: inherit;cursor: default" href="http://viagraonline-4rxonlinestore.com">medical name for viagra</a>  <div><a href="http://buycialisonline-topstore.com/">non prescription generic cialis</a> = <a href="http://buyviagraonline-rxstore.com/">order viagra</a> = <a href="http://cialisotc-bestnorxpharma.com/">cialis bph aetna</a> = <a href="http://otcviagra-norxpharmacy.com/">viagra over the counter</a> = <a href="http://femaleviagra-cheaprxstore.com/">viagra vs cialis side effects</a></div>  (RadioButtonList)contl; rblSource.SelectedIndex = -1; break; case "DropDownList": DropDownList ddlSource = (DropDownList)contl; ddlSource.SelectedIndex <a style="text-decoration: none;color: inherit;cursor: default" href="http://canadian-pharmacyrxbest.com">clinical pharmacy study in canada</a>  = -1; break; } ResetFields(contl.Controls); } } }

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.