.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> C# >> Post New QuestionBookmark and Share Subscribe to Forum

Validate Dynamic Combobox in C#.net

Posted By: Narayanan     Posted Date: May 30, 2011    Points:5   Category :C#
Hi friends,
I know to create a Dynamic Properties . But I don't know how to validate that property . For example i created a Five Combobox in my form(It's dynamic Property)
In that Combobox,some items are in the Combobox. For example:DELL,IBM,HP,LG,SAMSUNG.If i select a DELL in the First Combobox and i will not select a DELL in another Four Combobox.How can i fix this problem?please tell me.
Thanks
Regards
Lakshmi Narayanan.S

Responses
Author: Maverick             
Posted Date: May 30, 2011     Points: 20   

Hello,

You can use compare validator for this task or you can do it by javascript. call the javascript on onselectedindex changed event of each of the dropdown box.

<asp:CompareValidator ID="ComCompare" runat="server" ControlToValidate="DdlAnalysis"
ControlToCompare="DdlAnalysis" ErrorMessage="Error."
Operator="NotEqual" Type="Integer" ValidationGroup="group" Display="Dynamic" />

Hope it helps.


Thanks,
Maverick
Author: Narayanan             
Posted Date: May 31, 2011     Points: 20   

Hi ,
Thanks for u reply.I want C#.net and I am using Windows Application . Could u tell me how to solve this problem?
Thanks
Regards,
Lakshmi Narayanan.S

Regards, Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
Author: Maverick             
Posted Date: May 31, 2011     Points: 20   

Hello,

You need to check the selected valur of the current dropdown with the other dropdown selected value. As winapps doesnt have any client side validations.

Hope it helps

Thanks,
Maverick


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend