souptoy's Profile User Rating: -----

Reputation: 54 Whiz
Active Members
Active Posts:
244 (0.1 per day)
17-January 08
Profile Views:
Last Active:
User is offline Nov 04 2013 02:07 PM

Previous Fields

Who Cares
OS Preference:
Who Cares
Favorite Browser:
Who Cares
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
Icon   souptoy has not set their status

Posts I've Made

  1. In Topic: textbox.text validation

    Posted 26 Sep 2013

    You could also do the following:

    decimal AppID = 0;
    decimal.TryParse(txtAppId.Text, out AppID);

    TryParse will attempt to convert your string into the decimal base type and set it to the out variable. If it cannot, the out variable will be 0. This, in turn does not throw an exception.

    Optionally, you can do the following:

    decimal AppID = 0;
    bool blnIsConverted = false;
    blnIsConverted = decimal.TryParse(txtAppId.Text, out AppID);
    if (!blnIsConverted){
        //handle missing value

    As far as I know, Convert.ToDecimal really does Decimal.Parse so if you have an issue converting the string, an Exception will be thrown.
  2. In Topic: clearing textboxes (foreach) not working

    Posted 19 May 2013

    I don't have my test project in front of me right now but I believe you are looking for something like this:
    public void ClearTextBoxes(Control control) {
        foreach (Control c in control.Controls) {
            //can also be System.Web.UI.WebControls for web forms
            if (c.GetType() == System.Windows.Forms.Textbox) 
                ((TextBox)c).Text = "";

    Line 4 may not be entirely correct cause I am writing this free hand but I think that's the basic idea of what you're looking for
  3. In Topic: Getting Text To Appear Depending On Drop Down List Choice ?

    Posted 24 Dec 2012

    Glad to help :D
  4. In Topic: Getting Text To Appear Depending On Drop Down List Choice ?

    Posted 24 Dec 2012

    Have you set up your DropDownList1 to listen for the SelectedIndexChanged event in the UI side as well as set AutoPostBack = true?

    <asp:DropDownList id="DropDownList1" runat="server" AutoPostBack="true" onselectedIndexChanged="DropDownList1_SelectedIndexChanged" />

    Note: Line 4 in DropDownList1_TextChanged & 7 in DropDownList1_SelectedIndexChanged does nothing since it's not being assigned to anything.

My Information

Member Title:
D.I.C Head
Age Unknown
Birthday Unknown

Contact Information

Website URL:
Website URL  http://