?
Solved

Skip  <asp:RequiredFieldValidator

Posted on 2011-02-25
4
Medium Priority
?
576 Views
Last Modified: 2012-05-11
Hi experts,

I have MasterPage and SubPage. And SubPage has "<asp:RequiredFieldValidator ".
Using Hot Key In MasterPage, I try to go another screen without "<asp:RequiredFieldValidator ".
How can I skip this "<asp:RequiredFieldValidator "?
Please refer to my codes for this:

Thanks,




<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Add New" />
    protected void Button1_Click(object sender, EventArgs e)
    {
        string myForumID = ddlCategories.SelectedValue.ToString();
        Response.Redirect("~/AddEditPost.aspx?ForumID=" + myForumID);
    }

               <asp:TemplateField HeaderText="Name:">
                    <InsertItemTemplate>
                        <asp:TextBox ID="txtAddedBy" runat="server" Text='<%# Bind("AddedBy") %>' Width="99%"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="valRequireAddedBy" runat="server" ControlToValidate="txtAddedBy"
                            Display="Dynamic" ErrorMessage="RequiredFieldValidator" SetFocusOnError="True">Your name is required.</asp:RequiredFieldValidator>
                    </InsertItemTemplate>
0
Comment
Question by:Takeoutdinner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 8

Accepted Solution

by:
Anurag Agarwal earned 400 total points
ID: 34986345
hi buudy !!
Just open the  master page which has the button on which u have set a hot key just set the proferty
Causes validation = False for that button or control in master page.


0
 
LVL 21

Expert Comment

by:MogalManic
ID: 34987167
Just set the Visible property to false.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 34988301
Another possibility is to define validation groups, which gives you control over how things are validated:

Validation Groups in .NET
http://www.dotnet-guide.com/validationgroups.html
0
 

Author Closing Comment

by:Takeoutdinner
ID: 34990327
Thank you!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question