1
Reply

required field appear

Qaiser Mehmood

Qaiser Mehmood

Nov 14 2008 9:14 AM
2.6k

No  problem with popup calendar nor with dropdownlist and required field vlidator  but some thing happen why?

only problem is that when i click any popup calendar button  also with it required field tex * apear but all controls work properly

Iwant that by clicking popup calendar button  "*" should not apear only it should apear if i left out the dropdown selection before postbackurl. 

 

 

 

<asp:TextBox ID="tbMyDate" runat="server"

Width="154px" style="margin-left: 0px"></asp:TextBox>

<asp:ImageButton ID="ImageButton1" runat="server" Height="24px"

ImageUrl="~/images/call.bmp"

onclientclick="window.open('popup3.aspx?textbox=tbMyDate','cal','width=235,height=200,left=270,top=180,menubar=no,toolbar=no,status=no,scrollbars=no,resizable=no, titlebar=no');"

Width="25px" />

 

<asp:TextBox ID="tbMyDate1" runat="server"

Width="154px" ontextchanged="tbMyDate1_TextChanged"></asp:TextBox>

<asp:ImageButton ID="ImageButton2" runat="server" Height="24px"

ImageUrl="~/images/call.bmp"

onclientclick="window.open('popup4.aspx?textbox=tbMyDate1','cal','width=235,height=200,left=270,top=180,scrollbars=0,menubars=0,toolbars=0,directories=0,status=0');"

Width="25px" />

<asp:DropDownList ID="ddlpickup" runat="server"

DataSourceID="AccessDataSource1" DataTextField="pickup_location"

DataValueField="pickup_location" AppendDataBoundItems="True">

<asp:ListItem Value="0">Please Select</asp:ListItem>

</asp:DropDownList>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"

ControlToValidate="ddlpickup" Display="Dynamic"

ErrorMessage="RequiredFieldValidator" InitialValue="0">*</asp:RequiredFieldValidator>

<asp:AccessDataSource ID="AccessDataSource1" runat="server"

DataFile="~/DataBase/Autostop.mdb" SelectCommand="SELECT * FROM [location]">

</asp:AccessDataSource>


Answers (1)
Next Recommended Forum