new line character in the validation

Hi, I have a radiobuttonlist repeatdirection horizontally, and I have a requirefieldvalitor against this field with *. However, when the user miss the field and a red * is outputed, but it goes to the next line. I want them to be on the same line. How can I do that? Thanks.

0
avmood
4/2/2008 3:38:40 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

4 Replies
573 Views

Similar Articles

[PageSpeed] 21

post some code?

There may not be enough space on the line for it to go there so it automatically goes to the next line

0
ShaunRigby
4/2/2008 4:04:37 PM

Actually there are still a lot of space on the line. here's the code. 

<asp:RadioButtonList ID="GenderSelect" runat="server" RepeatDirection="Horizontal" OnSelectedIndexChanged="GenderSelect_SelectedIndexChanged" AutoPostBack="true">

<asp:Listitem Value="F" Text="Female" />

<asp:Listitem Value="M" Text="Male" />

</asp:RadioButtonList>

 

<asp:RequiredFieldValidator id="RequiredFieldValidator1"

ControlToValidate="GenderSelect"

Display="Static" ErrorMessage="You must select a gender"

InitialValue="" runat=server>

*

</asp:RequiredFieldValidator>&nbsp;

0
avmood
4/2/2008 4:07:21 PM

By default, the RadioButtonList creates a <table>. The <table> tag is a block-style tag, forcing any HTML after it to the next line.

You have two options:

Set RadioButtonList.RepeatLayout = Flow

Set RadioButtonList.Style.Add("display", "inline")   programmatically. This may vary based on the browser as some like block-inline or table-inline.

See http://www.blooberry.com/indexdot/css/properties/classify/display.htm


--- Peter Blum
Creator of Peter's Data Entry Suite (formerly Professional Validation And More and Peter's Date Package) and Peter's Polling Package
www.PeterBlum.com
0
PLBlum
4/2/2008 4:12:35 PM

Hi, Set RadioButtonList.RepeatLayout = Flow works out perfectly for me. Thanks again.

0
avmood
4/2/2008 4:30:14 PM
Reply:

Similar Artilces:

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Entering data in old aspx form only after saving data in new web form opened in new window
Dear all, i am facing a problem. please solve it. i have created two .aspx pages, say, page1.aspx and page2.aspx. with the help of client-side javascript i am opening page2.aspx from page1.aspx in a new window. So, page1.aspx and page2.aspx remains open at the same time. what i want is, i don't want the user to able to activate or enter data in page1.aspx without saving data in page2.aspx. regards subhajit use window.showModalDialog() instead of window.open() when the child window is closed, in this case, program execution continues on the next line after the showModalDialog...

New Form
I need to create a form that will post to a different page outside of the portal Virtual directory, when I do this the form either postsback to itself or does nothing. how do I get this resolved? I need it to be a form because I don't want the address to display the info.. Example Don't want www.mydomain.com/mypage.asp?data1=one&data2=two Please helpKeith K. Kowalski There are a couple of problems when trying to add forms to your aspx pages. First of all, the reason .NET is able to do all of it's fancy-schmancy event handling is through the use of a big fat form. ...

Strange lines in new web.config (.NET 3.5)?
What do the lines below mean? They appeared in my .NET 2.0->.NET 3.5-project after the conversion. The new .NET 3.5 System.Web.Extensions is referenced to earlier in the assemblies section, so I can't figure out what these lines do? I dont want to remove them, "dependentAssembly" seems important. Does this mean I can't remove my old ASP.NET AJAX assemblies from GAC? Thanks in advance!<runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="System.Web.Extensions&qu...

Funny character being added instead of spaces in .net web forms...please help
Hi,in all of my asp.net pages I have the following html code:&nbsp;&lt;TD class=padding colSpan=2 height=23&gt;&lt;div align="center"&gt;&lt;A &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; href="#"&gt;Privacy Policy&lt;/A&gt; »&lt;a href="#"&gt; Terms of Use&lt;/a&gt;&lt;/div&gt;&lt;/TD&gt;on my default.aspx page, this gets displayed as: Privacy Policy » Terms of Useand the code isPrivacy Policy » Terms of UseCan ...

windows forms in vb .net into web forms
we are creating a database driven website as part of our project. currently we have forms connecting to the database created in visual basic. these windows forms we need to convert into web forms which are asp .net compatible. can u give me an answer or show me a way. Hi, because of the difference in nature between web and win applications you'll need to reimplement at least the UI part. If you have a multitiered application in which the busines logic and data access are in different parts/assemblies you can reuse them. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Wor...

How to open a new web form in a new window?
How to open a new web form in a new window when we click on a button? Ex: I Have a Webform1.aspx which has a button and a few other controls. When click on the button i need to open a small window with Webform2.aspx which has a few other controls, the user enters the data and clicks on ok when we need to save and close webform2 and go back to webform1.aspx. How to do this? Any suggestions will be appreciated. Thanks. Check out these articles: http://www.codeproject.com/aspnet/Modal_Dialog.asp http://www.c-sharpcorner.com/Code/2003/Sept/ModalPopupInASP.NET.asp Darrell Norton, M...

validate Textbox in Web User Control from web form?
ASP.NET 2.0 I have a web user control that contains a textbox.  I need to add some validation (like requiredfieldvalidator, comparevalidator, etc). I would normally add the validator to my web user control by placing the validator next to my textbox.  However, I need the validation message somewhere else on my web form, not near the user control. So how would I associate a validation control on my web form with the text box inside my web user control?  Can this be done; any alternatives out there? Thanks!   The error message should occur wherever you place the vali...

.Net Web Form & Web Service Deployment
Hi all I have written some test web services and some web form applications and deployed them to my IIS. That's fine but I now want to deploy them to my real IIS server. I have created an msi for each but the problem is I seem to only be able to deploy to the default web site. Our default web site is turned off and instead we use several other sites. Does anybody happen to if Powerbuilder 11 supports non default web sites? If not do I need to hack the msi and if so can anybody suggest a suitable tool. I have Orca but it's not very friendly. Unless of course I knew exactly w...

How to Make Web Forms from other Web Forms
In putting together an ASP.NET application for a biz application, we have come to the point where there are three different types of basic forms which have, for the most part, been perfected. Now its is a matter of cloning those forms for various uses and modifying or adding code to suit the particular need. Copy and paste works OK, but there is a lot of changing of certain words, etc. Is there a way in ASP.NET to take these basic forms, turn them into classes or templates, create forms from them, then add or overwrite code? ? (Anybody who is a Vis Fox Pro programmer would know imme...

Web forms and mobile web forms
Hey everyone, I am looking to develope a web site that depending on the device connecting to it, it will display a certain page. In this case im looking to create a web and wap version of the same project. I have the Web forms version finished using ASP.NET and C# and I am wondering how to create the mobile web form and incorporate it in the project. In the project folder, can I just add a mobile web??? But what about displaying device specific pages?? Cheers -Dudach Yes, you can add mobile web forms and controls to your Web Application project. No problem. For device/br...

How to force a new line to keep one line only have 10 characters?
For example, user may input text as below: AAAAAAAAAABBBBBBBBBBCCCCCCCCCC But to make it as: AAAAAAAAAA BBBBBBBBBB CCCCCCCCCC string wholeLine = "AAAAAAAAAABBBBBBBBBBCCCCCCCCCC";List<string> lines = new List<string>();while ( wholeline.Length > 0){    if (wholeline.length >= 10)    {        lines.Add( wholeline.Substring(0, 10);        wholeline = wholeline.Substring (10);    }    else    {       &nb...

Web form and a gridview on the same page with data validators
I have a form where a user can submit a new customer and directly below that is a gridview where they can view the customer they just submited plus their other customers they have submited in the past. Now this gridview has the edit/update property so the user can modify their customer information. The whole idea is to have 1 single page where a user can do everything they need to without having to be linked to another page. On this page we can submit new customer info and view the status/info of existing customers and edit that info as needed. So far that works fine. I can submit the new c...

For interrupting.web form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form
Web Form Resized by position of the div : if div can't dispaly all (such as only top part , then web form heithten the heght),resize the web form ! Because of my pool English, if you can't see , I will explain more ! ThanksGambler is the real life I guess you mean when form grows it also grow parent div element. This is normal. If you want div to stay fixed size and rather clip the form and maybe show a scrollbar, look at overflow property in CSS.Thanks------------------------------------------------------------This posting is provided "AS IS" with no warranties, and confers no ...

Web resources about - new line character in the validation - asp.net.web-forms

Validation (drug manufacture) - Wikipedia, the free encyclopedia
In the pharmaceutical , medical device , food, blood establishments, tissue establishments, and clinical trials industries, validation is the ...

Serena Williams eyes history, Caroline Wozniacki craves validation in women's US Open final
As Serena Williams eyes another slice of tennis history, Caroline Wozniacki is craving validation with a watershed US Open final triumph on Sunday ...

Travers Duncan asks High Court to strike down ICAC validation laws
ICAC could be sent back to the High Court as a challenge to new laws validating corruption findings looms.

Adam Scott proclaims Texas win as validation of No.1 ranking
... No.1 golfer, beating American Jason Dufner in the third hole of a play-off at the Colonial event. "It's a good feeling and maybe some validation ...

Hollande to sign gay marriage bill after Constitutional Council's validation
Hollande to sign gay marriage bill after Constitutional Council's validation People's Daily Online ... 26, 27, 28, 29, 30, 31. Jan, Feb, Mar, ...

Marketers, Get Ready for the 'Validation Era'
The public brands included has been engaging in a "friends" arms race. But there are signs that we know we overdid it.

Validation and Uncertainty
What an extraordinary conversation I had recently on Twitter. It started with Neil Killick’s statement that we should not consider our stories ...

Nvidia Icera 410 LTE Modem Passes AT&T Network Validation
... Today's news is a small step and logical precursor toward both goals, Nvidia's Icera 410 LTE and HSPA+ baseband has passed AT&T's network validation ...

Ting’s Q1 Subscriber Growth Suffers from Sprint’s New Unlocking Validation Process
Back in February, Sprint updated the process it uses to validate unlocked devices that customers want to utilize on other carriers or one of ...

[Android M Feature Spotlight] Stricter APK Validation Now Actually Checks If All Of An APK's Files Are ...
While you might file this one under "really? We weren't doing this already?" if you're a security expert, Google has added stricter validation ...

Resources last updated: 1/8/2016 3:52:30 AM