473,473 Members | 1,415 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML Document Information

How do I get the value of a textbox element in the vb code behind a web
page. I tried Document.getelementbyid.innerHTML but it doesn't recognize it
the Document when I tried to set an object to my web page. Maybe I need to
add a reference and import some namespace? If this isn't the correct forum,
please let me know which forum is correct...I look at them all and couldn't
find any better than this site.
--
Dennis in Houston
Aug 19 '08 #1
5 1707
Try this.. works here

WebBrowser1.Document.GetElementById("the_input").G etAttribute("value")

--
Windows Live Butterfly
My little blog - http://sunco.codigoplus.com (in Spanish)

"Dennis" <De****@discussions.microsoft.comescribió en el mensaje de
noticias:D2**********************************@micr osoft.com...
How do I get the value of a textbox element in the vb code behind a web
page. I tried Document.getelementbyid.innerHTML but it doesn't recognize
it
the Document when I tried to set an object to my web page. Maybe I need
to
add a reference and import some namespace? If this isn't the correct
forum,
please let me know which forum is correct...I look at them all and
couldn't
find any better than this site.
--
Dennis in Houston
Aug 19 '08 #2
What type object do you declare WebBrowser1 as? VB doesn't recognize
WebBrowser as an object unless it is instantiated.
--
Dennis in Houston
"SuNcO" wrote:
Try this.. works here

WebBrowser1.Document.GetElementById("the_input").G etAttribute("value")

--
Windows Live Butterfly
My little blog - http://sunco.codigoplus.com (in Spanish)

"Dennis" <De****@discussions.microsoft.comescribió en el mensaje de
noticias:D2**********************************@micr osoft.com...
How do I get the value of a textbox element in the vb code behind a web
page. I tried Document.getelementbyid.innerHTML but it doesn't recognize
it
the Document when I tried to set an object to my web page. Maybe I need
to
add a reference and import some namespace? If this isn't the correct
forum,
please let me know which forum is correct...I look at them all and
couldn't
find any better than this site.
--
Dennis in Houston

Aug 20 '08 #3
Hi Dennis,

I'm guessing SuNcO was thinking of WinForms, where it sounds more like you
are using ASP.NET. In ASP.NET your code behind is the page, so to get
content you use the Controls property, e.g Me.Controls or use the
FindControl method of the page.

For ASP.NET questions, you cna also ask in the
microsoft.public.dotnet.framework.aspnet newsgroup.
"Dennis" <De****@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
What type object do you declare WebBrowser1 as? VB doesn't recognize
WebBrowser as an object unless it is instantiated.
--
Dennis in Houston
"SuNcO" wrote:
>Try this.. works here

WebBrowser1.Document.GetElementById("the_input"). GetAttribute("value")

--
Windows Live Butterfly
My little blog - http://sunco.codigoplus.com (in Spanish)

"Dennis" <De****@discussions.microsoft.comescribió en el mensaje de
noticias:D2**********************************@mic rosoft.com...
How do I get the value of a textbox element in the vb code behind a web
page. I tried Document.getelementbyid.innerHTML but it doesn't
recognize
it
the Document when I tried to set an object to my web page. Maybe I
need
to
add a reference and import some namespace? If this isn't the correct
forum,
please let me know which forum is correct...I look at them all and
couldn't
find any better than this site.
--
Dennis in Houston

Aug 20 '08 #4
Thanks for reply...actually, I'm using HTML Input control and trying to get
it's value when I used a callback in the code behind, not a postback. In
Java script, I can get the value by document.getelementbyid("nameof
element).value.
--
Dennis in Houston
"Bill McCarthy" wrote:
Hi Dennis,

I'm guessing SuNcO was thinking of WinForms, where it sounds more like you
are using ASP.NET. In ASP.NET your code behind is the page, so to get
content you use the Controls property, e.g Me.Controls or use the
FindControl method of the page.

For ASP.NET questions, you cna also ask in the
microsoft.public.dotnet.framework.aspnet newsgroup.
"Dennis" <De****@discussions.microsoft.comwrote in message
news:73**********************************@microsof t.com...
What type object do you declare WebBrowser1 as? VB doesn't recognize
WebBrowser as an object unless it is instantiated.
--
Dennis in Houston
"SuNcO" wrote:
Try this.. works here

WebBrowser1.Document.GetElementById("the_input").G etAttribute("value")

--
Windows Live Butterfly
My little blog - http://sunco.codigoplus.com (in Spanish)

"Dennis" <De****@discussions.microsoft.comescribió en el mensaje de
noticias:D2**********************************@micr osoft.com...
How do I get the value of a textbox element in the vb code behind a web
page. I tried Document.getelementbyid.innerHTML but it doesn't
recognize
it
the Document when I tried to set an object to my web page. Maybe I
need
to
add a reference and import some namespace? If this isn't the correct
forum,
please let me know which forum is correct...I look at them all and
couldn't
find any better than this site.
--
Dennis in Houston

Aug 20 '08 #5
Hi Dennis,

The callback is to an asp.net web service then ? If so it will only have
the information you pass to it.
"Dennis" <De****@discussions.microsoft.comwrote in message
news:1F**********************************@microsof t.com...
Thanks for reply...actually, I'm using HTML Input control and trying to
get
it's value when I used a callback in the code behind, not a postback. In
Java script, I can get the value by document.getelementbyid("nameof
element).value.
--
Dennis in Houston
"Bill McCarthy" wrote:
>Hi Dennis,

I'm guessing SuNcO was thinking of WinForms, where it sounds more like
you
are using ASP.NET. In ASP.NET your code behind is the page, so to get
content you use the Controls property, e.g Me.Controls or use the
FindControl method of the page.

For ASP.NET questions, you cna also ask in the
microsoft.public.dotnet.framework.aspnet newsgroup.
"Dennis" <De****@discussions.microsoft.comwrote in message
news:73**********************************@microso ft.com...
What type object do you declare WebBrowser1 as? VB doesn't recognize
WebBrowser as an object unless it is instantiated.
--
Dennis in Houston
"SuNcO" wrote:

Try this.. works here

WebBrowser1.Document.GetElementById("the_input"). GetAttribute("value")

--
Windows Live Butterfly
My little blog - http://sunco.codigoplus.com (in Spanish)

"Dennis" <De****@discussions.microsoft.comescribió en el mensaje de
noticias:D2**********************************@mic rosoft.com...
How do I get the value of a textbox element in the vb code behind a
web
page. I tried Document.getelementbyid.innerHTML but it doesn't
recognize
it
the Document when I tried to set an object to my web page. Maybe I
need
to
add a reference and import some namespace? If this isn't the
correct
forum,
please let me know which forum is correct...I look at them all and
couldn't
find any better than this site.
--
Dennis in Houston

Aug 20 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: George K | last post by:
This what my program should do, you give it the URL to a page and a template file, it downloads that page and then using the template file it returns some information. The way I thought of doing...
6
by: mike | last post by:
regards: Is it possible to use java XML api to translate a HTML document into a XHTML document(mobile profile) thank you best wishes
2
by: gregl | last post by:
Anyone know how to obtain the true size of the html document's body? The control contains the size that the control was set to. The body object appears to contain the same size. That information...
0
by: purespam | last post by:
How can I dynamically add file links to a html document? I need to be able to click an image icon and the "Open file" box should pop up where I can select a document from my harddisk. The...
3
by: Ken Kazinski | last post by:
I have a game program I am writing. I want to publish the results of a turn as a html document that I can then e-mail to the players. What would be the best way to create the html document...
2
by: csgraham74 | last post by:
Hi, I have a requirement in work that i give a person the ability to create a html document using a richt text editor. What i then want to do is save the HTML doct to my server & insert...
3
by: SMH | last post by:
Normally an SVG document is loaded/parsed/interpreted inside an HTML document using an 'object' (or 'embed') element, although there are supposedly other ways too. The problem is, the SVG document...
4
by: anutosh100 | last post by:
I want to make an html document. Suppose the name of the html document is anu.html. What i want is at first it will show "hello anutosh", and after 5 sec there will be some other ...
11
Dormilich
by: Dormilich | last post by:
Lately I have seen so much awful HTML, that I like to show what a HTML document should look like, regarding the requirements from the W3C. the absolute minimum is defined as: or expressed in...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.