.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

HTML Textbox size comparision in c#

Posted By: Appu     Posted Date: March 18, 2011    Points:5   Category :C#
Say for example my sample input file is,

Tag name: input
Attributes:
type="text"
name="hello"
size="49"

Tag name: input
Attributes:
type="text";
name="hello';
size="50";

Now how can i compare the size of the two textboxes... from the Tag name=input and attribute type="text" ....(size=49 && size=50)and results a mismatch result in this case

Responses
Author: Dhiraj Ranka             
Posted Date: March 18, 2011     Points: 20   

Hi,

Split on ';' character for value of Attributes and check the third element and then remove double quotes(") from this array element and then again split it on '=' character. Finally you will get the size value in second newly created array element. Compare and you are done.

You can also use string.Remove and string.Substring functions to remove splitting operations.

Hope this helps

Hope this helps.

Thanks & Regards,
Dhiraj Ranka
http://www.twitter.com/dhirajranka | http://www.dhirajranka.com


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