473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 1620
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 and fails in ie5.2 on a mac. "HTTP/1.1 400 Bad...
1
by: Eugfene | last post by:
I have the following function in a html file: function selectEdit(fileID, processCode, processID, fileName,fileDesc) { document.forms.recordID.value = fileID; document.forms.processor.value =...
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, I generate the html code manually () and put as...
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. When the file is dropped onto the listbox, the...
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 be able to set a Label.Text in the user control...
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 transfer the contorl data to to be used in page2...
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 retrieve these guests info so that I can post the info...
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 with every request. This is the forms bit in my...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.