|
-
Mar 26th, 2008, 02:27 AM
#1
Thread Starter
New Member
split option value in html page
how to split the option values in html page in vb.net
-
Mar 26th, 2008, 02:57 AM
#2
Re: split option value in html page
What do you mean by 'split' in this context? Could you use more words to explain your question?
-
Mar 26th, 2008, 07:19 AM
#3
Thread Starter
New Member
Re: split option value in html page
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
-
Mar 26th, 2008, 08:15 AM
#4
Re: split option value in html page
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.
-
Mar 26th, 2008, 09:13 AM
#5
Re: split option value in html page
If this is an html source code of a web page and you want to extract information from it, Regex is a good candidate.
-
Mar 26th, 2008, 11:20 PM
#6
Thread Starter
New Member
Re: split option value in html page
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}
-
Mar 27th, 2008, 04:32 AM
#7
Re: split option value in html page
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.
-
Mar 27th, 2008, 05:04 AM
#8
Thread Starter
New Member
Re: split option value in html page
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.
-
Mar 27th, 2008, 05:25 AM
#9
Re: split option value in html page
Same as before. Just find your 'unique' markers to start the string parsing.
-
Mar 27th, 2008, 11:47 PM
#10
Thread Starter
New Member
Re: split option value in html page
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|