Click here to Skip to main content
       

ASP.NET

 
AnswerRe: Dynamically update price based on exchange rate PinmvpSandeep Mewara20-Feb-13 22:49 
GeneralRe: Dynamically update price based on exchange rate PinmemberDeepa420-Feb-13 23:00 
GeneralRe: Dynamically update price based on exchange rate PinmvpSandeep Mewara20-Feb-13 23:59 
AnswerRe: Dynamically update price based on exchange rate PinmvpRichard MacCutchan21-Feb-13 0:02 
AnswerUse webservice for exchange rate PinmemberDavid Mujica21-Feb-13 4:04 
QuestionASP.NET 4.0 How to make session values alive still user logout. PinmemberVishwaKL20-Feb-13 20:36 
AnswerRe: ASP.NET 4.0 How to make session values alive still user logout. PinmvpSandeep Mewara20-Feb-13 22:46 
QuestionUser control variable not declared in .aspx page Pinmemberqueenmichelle20-Feb-13 15:16 
AnswerRe: User control variable not declared in .aspx page PinmemberKarthik Harve20-Feb-13 18:45 
AnswerRe: User control variable not declared in .aspx page PinmvpSandeep Mewara20-Feb-13 20:17 
QuestionThe information session ID PinmemberMohamad Hoosein Fakhravary20-Feb-13 13:45 
AnswerRe: The information session ID PinmvpSandeep Mewara20-Feb-13 18:14 
AnswerRe: The information session ID PinmemberMohamad Hoosein Fakhravary21-Feb-13 9:28 
Questionbutton disable until all required fields are filled [modified] PinmemberMember 870181320-Feb-13 8:12 
<asp:Content ID="Content2" ContentPlaceHolderID="mainContent" runat="server">
<center>
<script type="text/javascript">
     function EnableUpload() {
         if (document.getElementById("<%=txtfirstname.ClientID %>").value != "" && document.getElementById("<%=txtlastname.ClientID %>").value != "" && document.getElementById("<%=txtemailid.ClientID %>").value != "" && document.getElementById("<%=txtpwd.ClientID %>").value != "" && document.getElementById("<%=ddlusertypeid.ClientID %>").SelectedIndex != 0) {
             document.getElementById("<%=btnSubmit.ClientID %>").disabled = false;
         }
         else {
             document.getElementById("<%=btnSubmit.ClientID %>").disabled = true;
         }
     }
 
    </script>
<tr>
    <td align="left">
        &nbsp;</td>
    <td align="left" class="message" style="padding-left:10px" colspan="3">* Fields are
        mandatory</td>
    </tr>
    <tr>
    <td align="left">
        &nbsp;</td>
    <td align="left" class="bgcolor" style="padding-left:10px">
        First Name<asp:Label ID="Label1" runat="server" style="color: red;"
            >*</asp:Label>
        </td>
    <td align="left" colspan="2">
        <asp:TextBox ID="txtfirstname" runat="server"  MaxLength="20"
            onChange = "javascript:EnableUpload();"
             ></asp:TextBox>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"  Display="Dynamic"
            ControlToValidate="txtfirstname"
            ErrorMessage="Firstname&nbsp;is&nbsp;required" ForeColor="Red"
            SetFocusOnError="True" ValidationGroup="submit"
            ></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
    <td align="left">
        &nbsp;</td>
    <td align="left" class="bgcolor" style="padding-left:10px">
        Last Name<asp:Label ID="Label2" runat="server" style="color: red;"
            >*</asp:Label>
        </td>
    <td align="left" colspan="2">
        <asp:TextBox ID="txtlastname" runat="server"  MaxLength="20"
            onChange = "javascript:EnableUpload();"
             ></asp:TextBox>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"  Display="Dynamic"
            ControlToValidate="txtlastname"
            ErrorMessage="Lastname&nbsp;is&nbsp;required" ForeColor="Red"
            SetFocusOnError="True" ValidationGroup="submit"
            ></asp:RequiredFieldValidator>
        </td>
    </tr>
    <tr>
    <td align="left">
        &nbsp;</td>
    <td align="left" class="bgcolor" style="padding-left:10px">
       Email&nbsp;Id<asp:Label ID="Label3" runat="server" style="color: red;"
            >*</asp:Label>
        </td>
    <td align="left" colspan="2">
        <asp:TextBox ID="txtemailid" runat="server"  MaxLength="30"
            onChange = "javascript:EnableUpload();"
             ></asp:TextBox>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"  Display="Dynamic"
            ControlToValidate="txtemailid"
            ErrorMessage="Email&nbsp;Id&nbsp;is&nbsp;required" ForeColor="Red"
            SetFocusOnError="True" ValidationGroup="submit"
            ></asp:RequiredFieldValidator>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator1"
            runat="server" ErrorMessage="RegularExpressionValidator"
            ControlToValidate="txtemailid" Display="Dynamic" SetFocusOnError="True"
            ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
            ValidationGroup="submit" ForeColor="Red"></asp:RegularExpressionValidator>
        </td>
    </tr>
    <tr>
    <td align="left">
        &nbsp;</td>
        <td align="left" class="bgcolor" style="padding-left:10px">
       Password<asp:Label ID="Label5" runat="server" style="color: red;"
            >*</asp:Label>
        </td>
        <td align="left" colspan="2">
        <asp:TextBox ID="txtpwd" runat="server"  MaxLength="20"
            onChange = "javascript:EnableUpload();"
             TextMode="Password"></asp:TextBox><br />
             <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"  Display="Dynamic"
            ControlToValidate="txtpwd"
            ErrorMessage="Password&nbsp;is&nbsp;required" ForeColor="Red"
            SetFocusOnError="True" ValidationGroup="submit"
            ></asp:RequiredFieldValidator>
             </td>
    </tr>
    <tr>
    <td align="left">
        &nbsp;</td>
        <td align="left" class="bgcolor" style="padding-left:10px">
       UserType&nbsp;Id<asp:Label ID="Label4" runat="server" style="color: red;"
            >*</asp:Label>
        </td>
        <td align="left" colspan="2">
        <asp:DropDownList ID="ddlusertypeid" runat="server" MaxLength="10"
                onChange = "javascript:EnableUpload();" AutoPostBack="True" ></asp:DropDownList>
        <br />
        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"  Display="Dynamic"
            ControlToValidate="ddlusertypeid"
            ErrorMessage="Usertype&nbsp;Id&nbsp;is&nbsp;required" ForeColor="Red"
            SetFocusOnError="True" ValidationGroup="submit"
            ></asp:RequiredFieldValidator>
        </td>
    </tr>
<tr>
    <td align="center" colspan="4">
        <asp:Button ID="btnSubmit" runat="server" Text="Submit"
            ValidationGroup="submit" onclick="btnSubmit_Click" Enabled="False"/>
           </td>
    </tr>
</center>
</asp:Content>
protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               dtusertype = conn.select_usertype();
               if (dtusertype.Rows.Count > 0)
               {
                   ddlusertypeid.Enabled = true;
                   ddlusertypeid.DataSource = dtusertype;
                   ddlusertypeid.DataValueField = dtusertype.Columns["UserType"].ToString();
                   ddlusertypeid.DataTextField = dtusertype.Columns["UserTypeID"].ToString();
                   ddlusertypeid.DataBind();
                   ddlusertypeid.Items.Insert(0, new ListItem("Select", "0"));
               }
           }
       }
protected void btnSubmit_Click(object sender, EventArgs e)
        {
        }
 
        protected void ddlusertypeid_SelectedIndexChanged(object sender, EventArgs e)
        {
 
        }
till i fill all the textboxes the button is disabled.as soon as all the textboxes are filled the button is enabled.actually until i select any item other than "select" option button should be disabled.this is one pbm i am getting .the other pbm i am getting is i fill password textbox and i select one of the options for dropdownlist.as soon as item is selected password's textbox is becoming empty.why is this happening ....pls help me...

modified 21-Feb-13 3:21am.

AnswerRe: button disable until all required fields are filled PinmvpSandeep Mewara20-Feb-13 18:13 
GeneralRe: button disable until all required fields are filled PinmemberMember 870181320-Feb-13 21:04 
GeneralRe: button disable until all required fields are filled PinmvpSandeep Mewara20-Feb-13 22:42 
GeneralRe: button disable until all required fields are filled PinmemberMember 870181320-Feb-13 22:57 
GeneralRe: button disable until all required fields are filled PinmvpSandeep Mewara20-Feb-13 23:55 
GeneralRe: button disable until all required fields are filled [modified] PinmemberMember 870181321-Feb-13 3:07 
GeneralRe: button disable until all required fields are filled PinmemberMember 870181321-Feb-13 6:00 
GeneralRe: button disable until all required fields are filled PinmemberMember 870181320-Feb-13 23:09 
QuestionPlease Wait .... Pinmemberjojoba201119-Feb-13 22:19 
AnswerRe: Please Wait .... PinmvpSandeep Mewara19-Feb-13 23:11 
AnswerRe: Please Wait .... PinmemberKarthik Harve20-Feb-13 20:07 
QuestionRe: Please Wait .... Pinmemberjojoba201123-Feb-13 0:26 
Questionftp uploaded files are empty [modified] PinmemberOmid Reza Aryafar19-Feb-13 3:43 
AnswerRe: ftp uploaded files are empty PinmemberRichard Deeming19-Feb-13 5:17 
GeneralRe: ftp uploaded files are empty PinmemberOmid Reza Aryafar19-Feb-13 5:34 
QuestionCan a Compare validator fire when either of two controls changes? Pinmemberdarookie9918-Feb-13 18:13 
AnswerRe: Can a Compare validator fire when either of two controls changes? PinmentorBrij18-Feb-13 20:09 
GeneralRe: Can a Compare validator fire when either of two controls changes? Pinmemberdarookie9919-Feb-13 14:51 
AnswerRe: Can a Compare validator fire when either of two controls changes? Pinmemberryanb3119-Feb-13 3:32 
AnswerRe: Can a Compare validator fire when either of two controls changes? PinmentorKeith Barrow19-Feb-13 5:07 
Questionmultilanguage application PinmemberMember 870181318-Feb-13 8:39 
AnswerRe: multilanguage application PinmvpSandeep Mewara18-Feb-13 8:58 
GeneralRe: multilanguage application PinmemberMember 870181325-Feb-13 22:59 
GeneralRe: multilanguage application PinmvpSandeep Mewara26-Feb-13 0:24 
GeneralRe: multilanguage application PinmemberMember 870181326-Feb-13 2:44 
GeneralRe: multilanguage application PinmvpSandeep Mewara26-Feb-13 3:04 
GeneralRe: multilanguage application PinmemberMember 870181326-Feb-13 3:51 
GeneralRe: multilanguage application PinmemberMember 870181326-Feb-13 6:20 
AnswerRe: multilanguage application PinmvpSandeep Mewara26-Feb-13 6:38 
GeneralRe: multilanguage application PinmemberMember 870181327-Feb-13 5:38 
GeneralRe: multilanguage application PinmvpSandeep Mewara27-Feb-13 5:48 
GeneralRe: multilanguage application PinmemberMember 870181327-Feb-13 7:24 
GeneralRe: multilanguage application PinmvpSandeep Mewara27-Feb-13 7:28 
GeneralRe: multilanguage application PinmemberMember 870181327-Feb-13 17:10 
Questions/m has to send mail on button click event PinmemberMember 870181318-Feb-13 6:24 
AnswerRe: s/m has to send mail on button click event PinmvpSandeep Mewara18-Feb-13 6:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 27 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid