472,353 Members | 1,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

How do I retrieve / request a Windows.Form.Control's Value running on a WebForm ?

Hi all,

I have created a Windows Form control that runs on a web form. This control
is a
composite control comprising of other textboxes (public scope). This control
inherits from the Windows.Form.Control class.

I have put it on a web form with the following code :

<OBJECT id="MyWebControl" height="300" width="300"
classid="http:MyWebControl.DLL#My.MyWebControl1"
VIEWASTEXT>
</OBJECT>

Everything is OK but when I submit the page to the Web Server, how do I
retrieve the public textboxes values so I can process them on the web server
?

Any help is appreciated.

Thank you.

Softwaremaker
Nov 17 '05 #1
2 1546
When u submit, you will have to copy the things u need from inside the
control onto hidden fields. This can be done by js attached to the submit
button and by exposing the data reqd to be taken out of the control as
properties.

"Softwaremaker" <ms**@removethis.softwaremaker.net> wrote in message
news:Oa**************@TK2MSFTNGP12.phx.gbl...
Hi all,

I have created a Windows Form control that runs on a web form. This control is a
composite control comprising of other textboxes (public scope). This control inherits from the Windows.Form.Control class.

I have put it on a web form with the following code :

<OBJECT id="MyWebControl" height="300" width="300"
classid="http:MyWebControl.DLL#My.MyWebControl1"
VIEWASTEXT>
</OBJECT>

Everything is OK but when I submit the page to the Web Server, how do I
retrieve the public textboxes values so I can process them on the web server ?

Any help is appreciated.

Thank you.

Softwaremaker

Nov 17 '05 #2
Hello,

In this way, your Windows control is a client side control, and you cannot
access it from server side code. To get its values, you can add some
"Hidden input" field to the web form, for example, if your windows control
has a public property "CustomerName", you may add a hidden input field to
the web form:

<INPUT id="CustomerName" type="hidden" name="CustomerName">

Before you submit the web form to server, you can add following script:

CustomerName.value=MyWebControl.CustomerName

And on server side, you can get the value from

request.form("CustomerName")

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 17 '05 #3

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

Similar topics

8
by: turnit \(removethis\) | last post by:
I have a login form that uses the post method to carry the information to the next page. The form works just fine in ie6.0, but fails in mozilla...
1
by: Eugfene | last post by:
I have the following function in a html file: function selectEdit(fileID, processCode, processID, fileName,fileDesc) {...
1
by: zoltix | last post by:
Hi, How to retrieve a value in in an aspx page? Normally it is easy, drag and drops the textarea in aspx page and it is work. But in this case,...
2
by: Matt Theule | last post by:
I need to be able to allow users to drag files to a list box on a web page. To this end, I created a Windows Control and hosted it in a WebForm. ...
4
by: Andrea Williams | last post by:
I'm trying to set up a user control and change some values from the aspx page, but I keep running into trouble. What I really would like to do is...
0
by: dee | last post by:
Hi I'm a webform that fills a CheckListBox server control dynamically from a database. I then use Me.Server.Transfer("page2.aspx", True) to...
2
by: Hugh | last post by:
Naive developer needs help. how to retrieve a dropdown value inside a formview in VB? Is findcontrol the way to go? Thanks in advance. Hugh
3
by: David | last post by:
Hi, I have some code in my form as follows, to display 1 to 20 additional sets of fields to enter guest information. I am not sure how to...
3
by: dihola | last post by:
Hi, I have a website running in IIS7 and it seems to be creating a new session for every request I make. The values I store in Session are lost...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

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.