Click here to Skip to main content
15,894,955 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,I want access reg.pnu.ac.ir/Forms/AuthenticateUser/main.htm html code that open in
Internet Explorer and access input textBox in my c# app.

when I choose view page source in internet explorer i see input textBox tag and tag's Id
but when I use htmlElementCollection Or htmlElement in my code , I can't see <input> tag
to set attribute it.

what i do ?

I write this code but didnt work.

C#
foreach (HtmlElement el in webBrowser1.Document.All)
   {
       switch (el.Id)
       {
           case "F80351": el.InnerText = "880139701"; break;
           case "F80401": el.InnerText = "3342201"; break;
           case "btnLog": el.InvokeMember("click"); break;
       }
   }
Posted
Updated 16-Nov-13 23:56pm
v2
Comments
Sergey Alexandrovich Kryukov 17-Nov-13 14:31pm    
Not clear. Are you using WebBrowser class? Which one? Full type name, please.
What do you mean by "access"?
—SA
m.babri 19-Nov-13 8:40am    
thanks.I want set attribute <input> tag and submit . I want getElement <inout> tag of
Username or Password and set attribute with my value and sumbit.

1 solution

 
Share this answer
 
v2
Comments
m.babri 19-Nov-13 8:41am    
thanks.I want set attribute <input> tag and submit . I want getElement <inout> tag of
Username or Password and set attribute with my value and sumbit.

I don't need html code. i want set attribute <input type="text"> tags in my program.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900