TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
happyslug
NA
11
0
Field Validators and Post backs
Oct 4 2011 7:22 AM
I have a form which is mainly standard controls and an asp:table which I build in code
It all works fine until I start using field validators
Once I do on clicking my Save button, it performs the validation and shows the validationsummary - BUT this also involves a Post back - so the asp:table is wiped out.
Here is my Save button
<asp:ImageButton ID="BtnClientSave" runat="server" ValidationGroup="Servicegrp" ImageUrl="~/Images/Save.png"
OnClientClick="return BtnSaveClick()" OnClick="BtnClientSaveClick" Style="display: none" />
and my validation summary
<asp:ValidationSummary ID="valSummary" runat="server" DisplayMode="BulletList" ShowSummary="true"
ShowMessageBox="false" HeaderText="" ValidationGroup="Servicegrp" />
An example range validator
<asp:RangeValidator ID="rgeCurrentlyUnemployed" runat="server" ErrorMessage="Please Select an Unemployment Status"
Text="*" ControlToValidate="ddlCurrentlyUnemployed" MaximumValue="999999" MinimumValue="1"
ValidationGroup="Servicegrp"></asp:RangeValidator>
and my table
<asp:Table ID="QuestionTable" runat="server">
</asp:Table>
Reply
Answers (
6
)
Change the Empty cell in gridview to something else
Cannot insert value in database