You are here:   Home
Register   |  Login

Captured Technology - Blog

Minimize

ASP.Net Form Issues Solved

Aug 4

Written by:
8/4/2009 3:25 PM  RssIcon

ASP.Net Form Issues Solved

I was working on a ASP.Net form this week that created several issues that I need to research to solve. Radio Buttons on the page were making all other controls undetectable within the code. Validation text was wrapping from next to the validated control to underneath the control. And the Reset button on the page was causing validation to occur which is not desirable.

Radio Button List

I was able to solve the issue of radio buttons on the page affecting all other controls by wrapping the buttons into a radio button list.

<asp:radiobuttonlist id="rdSpecificInvoiceInfo" runat="server">
     <asp:listitem id="rdSpecificInvoiceInfoY" runat="server" value="Yes" />
     <asp:listitem id="rdSpecificInvoiceInfoN" runat="server" value="No" />
</asp:radiobuttonlist>

Validation Text Wrapping

The second issue was solved by adding a style tag to the validation control itself.

<asp:RequiredFieldValidator style="white-space:nowrap" 
ID="rfvYourName" visible="False" runat="server" ErrorMessage="Your Name is Required"
Font-Bold="True" Font-Italic="False" ControlToValidate="txtYourName"
Enabled="True"></asp:RequiredFieldValidator>
 

No Validation on Reset

The reset button was the simplest but most difficult to solve. I found one article detailing the use of validation groups which did nothing but waste time in the implementation. Finally I found some information online about setting one property on the button, CausesValidation.

<asp:Button ID="bReset" CausesValidation="False" CssClass="form_control" 
runat="server" ToolTip="Reset" Width="60" Text="Reset" />

Tags:
Categories:

4 comment(s) so far...


Gravatar

Re: ASP.Net Form Issues Solved

I'm also facing same kind of problem. I'm very grateful to you for providing the proper / accurate solution.

By ansv@Webdevelopment ny on   8/13/2009 2:29 AM
Gravatar

Re: ASP.Net Form Issues Solved

I recommend this method method to my friend. He also facing the same problem.

By ansv@Webdesign ny on   9/3/2009 10:12 AM
Gravatar

Re: ASP.Net Form Issues Solved

thank u for providing the proper / accurate solution.

By seamless steel pipe on   10/22/2009 7:58 PM
Gravatar

Re: ASP.Net Form Issues Solved

one more method which found for ASP.NET is to add an image button to the aspx page with an image url referencing the desired button, then on the click event on the code behind page, do a Response.Redirect and use the email option from the code provides after the button is designed.it also provide good help

By Venice Hotels on   9/7/2010 1:50 AM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

FaceBook

Minimize

Mobile Version

Minimize
Add CapturedTech - Technology Mippin widget

Translate

Minimize

Sponsors

Minimize

Recent Comments

Minimize
Re: Three Benefits to Using a Royalty-Free Image on Your Website or Blog
Don't pay for royalty free images. They are free after all! I offer links to 96 websites that have tens of thousands (maybe even hundreds of thousands) of absolutely free images, including ones for commercial use! All you need to do is subscribe to my blog at www.davesinternetmarketing.info/royalty-free-images-free-for-commercial-use/
Re: Buzzom Offers Featured User Options
This is when discovered this great new way to grow your follow list. You can pay between $10 and $100 for the number of times you want to app ar at the top of the list.
Re: Microsoft Test Bounties
I had spent a good deal of my time looking for someone to explain this subject clearly and I have really enjoyed reading your blog posts and I collected a lot of interesting things as well as I done a research on the subject and learn most peoples will agree with your blog.
Re: 10 Ways to Source Great Sales Leads
Hoovers.com, that have contact information for tens of millions of businesses. If necessary, you can work with these companies' research teams to order lists specifically tailored to your organization's sales needs.
Re: Microsoft Test Bounties
To find bugs and showing it to microsoft is quite admirable. Keep blogging more i will appreciate.

u comment, i follow