hello
i m using update pannel and required field validator is working properly but the problem is that red * dont appear with required fields after post back its stops till i enter required fields i want to see red * with that fields how can i???
umair.sabri -2 Light Poster
vuyiswamb 17 Posting Whiz
I dont understand your Questiion
kouroshnik 0 Light Poster
I don't Undrestand Too
lili.edryana 0 Light Poster
your validator may not work in updatepanel anymore..
but then you can download the compatible version where all the validators work in updatepanel.. refer here to download..
http://blogs.msdn.com/b/mattgi/archive/2007/01/23/asp-net-ajax-validators.aspx
shine_jose -6 Light Poster
Check the validation group property of all controls are same or not
.please past the code if still pblm is there
Edited by shine_jose because: n/a
KushMishra 38 Senior Technical Lead
Hello, I got your problem and may be it is a simple one if you could please check the "Validated To" field in the properties.
lal.ramesh 9 Newbie Poster
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
<style type="text/css">
.style1
{
width: 152px;
}
.style2
{
width: 644px;
}
</style>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<table style="width: 100%;">
<tr>
<td>
ID</td>
<td>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Text="use id for search"></asp:Label>
</td>
<td>
<asp:Label ID="Label1" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
name</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox2" ErrorMessage="Name is requird"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
phone number</td>
<td>
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox3" ErrorMessage="Phone number is requird"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
E-mail</td>
<td>
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="Email is requird"
ForeColor="#CC0000"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td align="left">
<asp:Button ID="Button1" runat="server" Text="Insert" onclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" onclick="Button2_Click" Text="View record" />
<asp:Button ID="Button4" runat="server" Text="Update" onclick="Button4_Click" />
<asp:Button ID="Button3" runat="server" Text="Delete" onclick="Button3_Click" />
<br />
<asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333"
GridLines="None">
<AlternatingRowStyle BackColor="White" />
<EditRowStyle BackColor="#2461BF" />
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#EFF3FB" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#F5F7FB" />
<SortedAscendingHeaderStyle BackColor="#6D95E1" />
<SortedDescendingCellStyle BackColor="#E9EBEF" />
<SortedDescendingHeaderStyle BackColor="#4870BE" />
</asp:GridView>
</td>
</tr>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>
kvprajapati 1,826 Posting Genius Team Colleague
@lal.ramesh
Please read the rules before posting again, in particular the 'keep it spam-free'. If you hit 10 infraction points your account gets an automatic ban, so it is worth obeying the rules if you want to continue to benefit from DaniWeb help.
PS: Please post well-formatted code on the board.
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.