List value attribute

 We have Range Attribute where we can specify the minimum and maximum value for a column

is their a attribute or method by which i can specify a list of  valid values like (15,30,45,60)

 

0
sksmum
4/20/2009 11:27:50 PM
asp.net.dynamic-data 1365 articles. 0 followers. Follow

2 Replies
689 Views

Similar Articles

[PageSpeed] 35

Hi There,

You can use reqularexpressionvalidator to validate the requirement. and maybe require field validator to ensure text is not empty

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="This is required!" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>

<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ErrorMessage="Only accept value 15, 30, 45, 60." ControlToValidate="TextBox1" ValidationExpression="(15|30|45|60)"></asp:RegularExpressionValidator>

Hope it helps!


DC517
Don't forget to click "Mark as Answer" on the post that helped you.
This credits that member, earns you a point and marks your thread as Resolved.
0
d4dennis
4/21/2009 1:02:46 AM

 Thanks for the Lead

[RegularExpression("(0|15|30|45)", ErrorMessage = "Mintues Must be 0 - 15 - 30 - 45")]

 

 

 

0
sksmum
4/21/2009 10:02:14 AM
Reply:

Similar Artilces:

Drop down list in Form view returns error when value in bound field (data binding
I get the following error when I click edit to edit the details in the web form:'ddlUserRestrictionType' has a SelectedValue which is invalid because it does not exist in the list of items.Parameter name: value  I would like it to accept any value which currently exists in the database. Is this easily achievable? With what you've posted, all I can tell is that you are trying to set the SelectedValue of a ddl to a value that does not exist in the list.  It would be helpful if you can post some code and the expected values of this control.~ Timwww.bucketo...

Dynamic Data over ADO.NET Data Service
I would like to create a dynamic data web site that does not have a database connection to the underlying database, but instead accesses the data through an ADO.NET data service.  Is this possible?  Thanks,Dennis If you look at the Dynamic Data Futures solution on CodePlex, it has an early version of something that does that.  Also, see this thread. thanks,David David,  That's exactly what I was looking for.  However, I am running into a problem when I try to develop my own dynamic data client site.  I created a dynamic data web site, added a referenc...

Dynamic Data And Ado.Net Data Service
Hi,I'm wondering if it is possible to mix up Dynamic Data and Ado.Net Data Service.I have found no information on google yet.Thanks for your replies, Hasan Yes you will be able to have a look at the Preview on Codeplext here the new Domain Service will allow this sort of thing see David Ebbo's and Nukhil Kothari's sessions at mix09 Microsoft ASP.NET 4.0 Data Access: Patterns for Success with Web Forms .NET RIA Services - Building Data-Driven Applications with Microsoft Silverlight and Microsoft ASP.NETSteve Seeking the elegant solution.[Oh! If olny I colud tpye!]c# Bits...

Dynamic Data with ADO.NET Data Services
Is it currently possible to use Dynamic Data with ADO.NET Data Services? I've had a play with this to see if this would work but I didnt have much luck. I ran the datasvcutil.exe against my service (which is a  ADO.NET Data Services on a LINQ to SQL model) but I ended up with a "The context type 'Entities.NorthwindDataContext' is not supported" message.  It seems to make sense that these technologies would work together...is there something else I am missing? Perhaps this functionality isn't supported yet? Thanks, Craig Hi Cr...

Dynamic Data with ADO.NET Data Services #2
I'm using the DynamicData Futures Preview 2 DLL's to create an n-tier Dynamic Data website using ADO.Net Data Services.I'm trying to add Many-to-Many relationship support using David Ebbo's article as a basis, but it would appear that the client-side model generated by DataSvcUtil.exe (Add Service Reference....) doesn't contain enough information to identify Many-to-Many relationships?For example, I have Contacts and Regions joined through a ContactRegion table.  EF models this correctly on the server and DataServices exposes it correctly - With a Contact having a Re...

Dynamic Data working against an ADO.NET Data Service
 Is there an example available of Dynamic Data using an ADO.NET Data Service?  I read there are prototypes of this in the works, are they available for review / use?  Check out our Dynamic Data Futures for a prototype data source control for consuming ADO.NET Data Services. http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475.Scott HunterPM, ASP.NET Team, Microsoft...

Can I use ADO.NET Data Services with Dynamic Data Websites?
I would like to use Dynamic Data Websites with the proxy class generated from WebDataGen.exe.  Is this possible?  Also, does the SchemaCreator class support the Provider model? In the current CTP, Dynamic Data only supports Linq To Sql models.  In th next release, it will also support Entity Framework models.  However, it won't directly support ADO.NET data services, though we are looking at this scenario for a later release. thanks,David...

Mutli-valued attribute to multi-valued attribute
We want to synchronize a multi-valued attribute (created by our own) to a multi-valued attribute in the other edirectory store. But when we are adding attributes we only have the changed values. The previous one is lost. When deleting one value in the Identity Vault then it removes the attribute from the object. Any ideas ? > We want to synchronize a multi-valued attribute (created by our own) to a > multi-valued attribute in the other edirectory store. But when we are > adding attributes we only have the changed values. The previous one is > lost. When deleting ...

retrieving values from list box then use this values to retrieve data from db to gridview
 help.. can anyone give me some idea or examples regarding this one... the select formula should be something like this.. but not totally like this..Dim selectinfo = (from a in db.PRs _where a.PRID = item[1] and a.PRID = item[2] and a.PRID = item[3] _select a) those item[1], item[2]....etc are the values inside the listbox...  how will i apply that into the select command... using loop...thank you in advance... Regards,MhaeyPlease remember to click “Mark as Answer” on the post that helps you.. =) string selectedItems = "";for (int vLoop = 0; vLoop < lstIte...

Dynamic data list
Hi,   I have a requirement which displays all the customers who have ordered for products in a month.I am getting it in user control. Once I click the customer name in the list, just below that, I would like to display all the orders for that customer in that month.Its like a drill down. After clicking the customer, room should be provided between the current customer and the next customer to show the order details.How can I achieve this?Any reply is highly appreciated.cheers  If you're using AJAX, you can try with Accordion: http://www.asp.net/AJAX/AjaxControlToolkit/Sa...

dynamic binding of datas with item template containing drop down list created dynamically in the datagrid
hai every body ,i have to to do following1.creation of  n- number of  dynamic headers  where n is number of values in the datacolumn(table of database)at2.creation of n-number of dynamic template columns  dynamically with drop down lists in it.i have to create data grid with dynamic template column created having drop down list in each temlate columnthe following code is written under the page load of webform containing datagrid DGdashboardi have completed the above task with following code to come .I could not create dropdownlist with unique na...

populating the dropdown list with the values from the data base, Failing near adding the values todropdown
Here is My code' .aspx &nbsp;<asp:DropDownList ID="ddlkeyword" runat="server" Width="204px" >   </asp:DropDownList></td>   .aspx.cs   page_load() { fillddlkeyword(); }private void fillddlkeyword() {string StrSql = "Select distinct(formName)as formName from tbl_form"; oDB.RunDBQuery(StrSql, out oRS);DataTable dt = new DataTable(); dt.Columns.Add("Form");if (oRS.HasRows) {while (oRS.Read()) {DataRow dr = dt.NewRow(); dr["Form"] = oRS["formName"].ToString(); &n...

Dynamic Data SP1 chokes on Northwind and AdventureWorks using ADO.Net Entity Data Model
Now that SP1 is out, I'm trying out DD with ADO.Net EDM and ScaffoldAllTables=true. I am using Northwind first and AdventureWorks second in two separate websites as my databases. Both render the My Tables page correctly. When you drill down 1 or 2 levels deep, it bombs. Example: Using adventureworks db, click on address table, then click on viewEmployeeAddress in the first row. I get this: A property with name 'Address.AddressID' does not exist in metadata for entity type 'DDAdventureWx.EmployeeAddress'.Is this supposed to work with ADO.Net EDM "right out of the ...

One attribute value to two attributes/ values in eDir
Collective, I have a very interesting issue. I have the need to break one attribute that is in AD (ADval1) to two attributes in eDir (attrval1 and attrval2) . Basically what I want to do is take ADval1 and break that data into the two other attributes, attrval1 and attrval2. The attribute in AD looks like this: AD attribute value data 1 | value data 2 In eDir it looks like this: eDir attribute 1 vlaue data 1 eDir attribute 2 value data 2 I don't know if that's clear, when it was explained to me it was a white board. Has anyone tried this or have any id...

Web resources about - List value attribute - asp.net.dynamic-data

Attribute - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Template:Attributes of God - Wikipedia, the free encyclopedia
Language: English Română Home Random Template:Attributes of God Part of a series on the Attributes of God Aseity Eternity Graciousness Holiness ...

Six Attributes Of The Perfect Facebook Page Administrator
So, here’s the thing: In many ways, hiring a Facebook page administrator is akin to hiring a poster child for your brand. This trusted manager ...

PANDA: Pose Aligned Networks for Deep Attribute Modeling - Facebook
We propose a method for inferring human attributes (such as gender, hair style, clothes style, expression, action) from images of people under ...

Facebook announces data partnerships to help advertisers target users by offline purchases and attributes ...
... will anonymously match data from consumer loyalty programs with user profiles in order to target ads by offline purchase habits and other attributes. ...

New Study Attributes Rapid Ageing Mainly To Environment Factors
New study explains why some people age faster than others.

Should I use the nofollow attribute on internal links? - YouTube
Regarding "nofollow" on internal links: Does it hurt? Does it help? I read different comments from Matt on this matter over time. What's the ...

Justin Trudeau attributes abortion stance to father's example
Liberal Leader Justin Trudeau says he is following an example set by his famous father when it comes to his position on election candidates and ...

Obama attributes western U.S. wildfires to climate change
... that has burned nearly 400 square miles in the north-central part of Washington state, along with blazes in other Western areas, can be attributed ...

Fifty Shades Of Grey Baby Births: Windsor Hospital Sees Spike In Births, Attribute Book
A significant spike in baby births at a hospital in Windsor, Ontario, has been attributed to the book Fifty Shades of Grey, which has become ...

Resources last updated: 12/8/2015 4:00:27 AM