how to split the option values in html page in vb.net
Printable View
how to split the option values in html page in vb.net
What do you mean by 'split' in this context? Could you use more words to explain your question?
sure..
actually im using the following source code
<OPTION VALUE="ACCT">Accounting
<OPTION VALUE="AJ">Administration of Justice
<OPTION VALUE="AGRI">Agriculture/Landscaping
<OPTION VALUE="ACRV">Air Cond/Refrig/Vent
<OPTION VALUE="AFAB">Aircraft Fabrication&Assembly
<OPTION VALUE="AERO">Airframe and Powerplant
<OPTION VALUE="ANTH">Anthropology
<OPTION VALUE="ART">Art
<OPTION VALUE="ASTR">Astronomy
<OPTION VALUE="ATH">Athletic Training
<OPTION VALUE="AUTO">Automotive Technology
<OPTION VALUE="BIOL">Biology
<OPTION VALUE="BUS">Business
<OPTION VALUE="CHEM">Chemistry
<OPTION VALUE="CFE">Child and Family Education
<OPTION VALUE="CT">Clothing and Textiles
<OPTION VALUE="COMM">Communication Arts
<OPTION VALUE="CA">Computer Applications
<OPTION VALUE="CG">Computer Graphics
<OPTION VALUE="CIS">Computer Information Science
<OPTION VALUE="DA">Dance
<OPTION VALUE="DFST">Deaf Studies
<OPTION VALUE="ECON">Economics
<OPTION VALUE="ED">Education
<OPTION VALUE="ELEC">Electrical Technology
<OPTION VALUE="ELTE">Electronics Technology
<OPTION VALUE="EMT">Emergency Medical Technology
<OPTION VALUE="ENGR">Engineering
<OPTION VALUE="ENGL">English
<OPTION VALUE="ESL">English as a Second Language
<OPTION VALUE="EOPS">Extended Opportunity Program
<OPTION VALUE="FTV">Film and Television
<OPTION VALUE="FTEC">Fire Technology
<OPTION VALUE="FREN">French
<OPTION VALUE="GEOG">Geography
<OPTION VALUE="GER">German
<OPTION VALUE="HE">Health Education
<OPTION VALUE="GED">High School Equivalency
<OPTION VALUE="HIST">History
<OPTION VALUE="HHA">Home Health Aide
<OPTION VALUE="HD">Human Development
<OPTION VALUE="ID">Interior Design
<OPTION VALUE="INT">Interpreter Training
<OPTION VALUE="LAC">Learning Assistance Center
<OPTION VALUE="LIB">Library
<OPTION VALUE="MGT">Management
<OPTION VALUE="MATH">Mathematics
<OPTION VALUE="MOA">Medical Office Assisting
<OPTION VALUE="MM">Multimedia
<OPTION VALUE="MUS">Music
<OPTION VALUE="NCR">Non-Credit Program
<OPTION VALUE="NA">Nurse Aide
<OPTION VALUE="NS">Nursing Science
<OPTION VALUE="NF">Nutrition and Foods
<OPTION VALUE="OT">Office Technology
<OPTION VALUE="PHIL">Philosophy
<OPTION VALUE="PHOT">Photography
<OPTION VALUE="PE">Physical Education
<OPTION VALUE="PSCI">Physical Science
<OPTION VALUE="PHYS">Physics
<OPTION VALUE="POLS">Political Science
<OPTION VALUE="PSY">Psychology
<OPTION VALUE="READ">Reading
<OPTION VALUE="RE">Real Estate
<OPTION VALUE="RT">Respiratory Care/Therapy
<OPTION VALUE="SOC">Sociology
<OPTION VALUE="SPAN">Spanish
<OPTION VALUE="THA">Theatre Arts
<OPTION VALUE="VN">Vocational Nursing
<OPTION VALUE="WELD">Welding
<OPTION VALUE="WFDV">Work Force Development
</SELECT>
in this code i want to split the values like Accounting,Administration of Justice..
all subjects during runtime and store it in a combobox
It's already in a combobox format (a select box). What am I missing here?
All you're missing is the </option> at the end of each line.
Is this "source code" you showed me not in your web page?
Also, PM RobDog888 and ask him to move this thread to the ASP.NET forum. He's a good mover and shaker.
If this is an html source code of a web page and you want to extract information from it, Regex is a good candidate.
yes i want to split this names only and stored to a combobox in my form pls send me vb.net code for such process.website for that html code is
{https://bannerweb.avc.edu/avcprod/az_tw_zipsched.P_search}
Use an HttpWebRequest. Request the page, get the string back.
Using regular expressions, look for the bit where it says
<SELECT NAME="sel_subj"
Because sel_subj identifies that <select> uniquely.
Get all the text between that select and the closing </select>.
Now you can use regular expressions again to get the text after each of the <option>s, or you can replace each <OPTION with </OPTION><OPTION so that it's valid enough to be loaded into an XMLNode or some XML manipulating class.
thank u so much
i need another help pls visit that site and click the department u can see that the datas in the department.first store that page in local drive and i want to save the department datas in a text document during runtime pls help me with sample code.
Same as before. Just find your 'unique' markers to start the string parsing.
thank u so much
i need another help pls visit that site and click the department u can see that the datas in the department.first store that page in local drive and i want to save the department datas in a text document during runtime pls help me with sample code.im not understand it will u pls send me one sample code