Solved

Skip  <asp:RequiredFieldValidator

Posted on 2011-02-25
4
572 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 100 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

696 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