How can I pass variable or Property values from my popup webForm to the
webform that opened this popup?
For information that's in a control (i.e. Textbox), I'm using javascript and
document.getEle mentById:
var variable = document.getEle mentById('txtBo x).value;
But if the control is hidden, that javascript code generates an error. Can
this be done with properties?
Thanks. 5 1737
"VMI" <VM*@discussion s.microsoft.com wrote in message
news:D8******** *************** ***********@mic rosoft.com...
How can I pass variable or Property values from my popup webForm to the
webform that opened this popup?
http://msdn.microsoft.com/library/de...odaldialog.asp
For information that's in a control (i.e. Textbox), I'm using javascript
and
document.getEle mentById:
var variable = document.getEle mentById('txtBo x).value;
I'm assuming that the missing apostrophe after txtBox is just a typo...?
But if the control is hidden, that javascript code generates an error.
Sigh - WHAT ERROR DOES IT GENERATE?
Can this be done with properties?
Yes.
there is hidden (type=hidden) and invisible. javascript can see hidden
fields. fields marked invisible are not render, so the brwser does not see
them.
-- bruce (sqlwork.com)
"VMI" <VM*@discussion s.microsoft.com wrote in message
news:D8******** *************** ***********@mic rosoft.com...
How can I pass variable or Property values from my popup webForm to the
webform that opened this popup?
For information that's in a control (i.e. Textbox), I'm using javascript
and
document.getEle mentById:
var variable = document.getEle mentById('txtBo x).value;
But if the control is hidden, that javascript code generates an error. Can
this be done with properties?
Thanks.
Thanks for the post. Sorry about the vague post.
The missing apostrophe was just a typo when I posted the message.
The error I get when I try to get the server-side textBox value (when
visible= false) is "Object Requred". If I make it visible, it works. The
problem is that this information doesn't need to be displayed.
I'm using server-side textboxes because they interact with a gridview and I
feel more comfortable with them. So I can't use (Type= hidden).
How can this be done with properties instead of retrieving the value of the
Textbox?
Thanks.
"Mark Rae" wrote:
"VMI" <VM*@discussion s.microsoft.com wrote in message
news:D8******** *************** ***********@mic rosoft.com...
How can I pass variable or Property values from my popup webForm to the
webform that opened this popup?
http://msdn.microsoft.com/library/de...odaldialog.asp
For information that's in a control (i.e. Textbox), I'm using javascript
and
document.getEle mentById:
var variable = document.getEle mentById('txtBo x).value;
I'm assuming that the missing apostrophe after txtBox is just a typo...?
But if the control is hidden, that javascript code generates an error.
Sigh - WHAT ERROR DOES IT GENERATE?
Can this be done with properties?
Yes.
Try this.
<asp:TextBox style="display: none" runat="server"
ID="txtTest"></asp:TextBox>
It will still render and your javascript will work as expected.
Yes, I agree with Gozirra.
Some more information: for server-side textboxes, if you set the
Visible property = false, then asp.net tries to be "smart" and does not
render the text box at all. This is not what you want and is
completely different from rendering a textbox that is not visible.
Three common ways to solve your issue:
1) CSS Solution: Like Gozirra said, use the display:none style
2) Asp.Net 1.1 Solution: In the code-behind, use
"Attributes.Add (visible, false)". This will set the html visible
property to false, not the ASP.Net Visible property.
3) Asp.Net 2.0 Solution: Asp.net 2.0 has a new control to solve this
issue called: <asp:hiddenfiel d>. This is probably the preferred way
to do it in asp.net 2.0. Microsoft created the hiddenfield control to
solve the problem you are having. Use a HiddenField control instead of
a TextBox. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Job Lot |
last post by:
How would I send information from DataGrid on the main form of the
application to a modal popup form and then pass any changes to the data back
to the main form and database when the popup form was closed?
Thanks
|
by: Newbie |
last post by:
Hi!
How do I pass strings between webforms using Request in the target
webform but without using
Response.Redirect("SearchPOs.aspx?vendorName=" + vendorName);
in the source webform. This is bec. the source webform is a popup window and
I am not able to pass the strings. I also dont want the popup (source)
webform to become another target webform. Any suggestions?
|
by: Mike Fellows |
last post by:
Ok, im not sure if this is at all possible and if it is how i go about it is
beyond me
i have a piece of client side code that requires a piece of data from the
server side (an ID number in this case)
how can i pass the data from one side to the other, or retrieve it from the
webform on the client side?
i hope ive explained this properly
|
by: billy |
last post by:
Ok, here's the situation... I have a user control that contains two
textboxes (one for a from date/time and one for a to date/time) and two
image buttons. The user control itself is supposed to be used on a number
of different ASPX pages (that's why I made it a ASCX). When clicking the
image button, I run simple JavaScript to open another popup ASPX page that
contains a calendar control and two dropdownboxes for the time (hours :...
|
by: Peter |
last post by:
Does any one has an example of how do I retrieve values from a PopUp Window. The popup windows is an ASP.NET webform and it is displayed when user clicks on a html button.
How do I retrieve the values from the popup window into the parent window (I would like to do something with the data after the OK button is clicked on the popup window)
Here's the code for popup.
OpenPopUp(someWebContol, "MyPopup.aspx?textbox=" +...
| |
by: Aaron |
last post by:
I am having a little difficulty with a relatively simple task.
I have a parent webform. I have a javascript attribute added to a button to
open a new window when clicked.
The user fills in a textbox then clicks the button and on page load the
child window should grab that val run a query an present the results.
Given that I am bouncing between server side controls and client script. I
am just having a little trouble passing my textbox...
|
by: VMI |
last post by:
How can I transfer some text from a Textbox in a popup window to the main
webform that opened that popup?
The popup webform will have some type of Button that the user will click in
order to accept those changes. This is where the transter of the value should
be. It could also be done when I close the popup form (whichever is easier).
Once the popup form is closed, the value will then be used to fill a textbox
in the main Form.
I use...
|
by: RipperT |
last post by:
College newbie here (Instructor MIA). I have instructions to pass variable
values from one web page to another like this (VS2005):
1. Declare and create the properties on the first page (source form):
Public ReadOnly Property UserName() As String
Get
Return userNameTextBox.Text
End Get
End Property
2. Call the next page by calling the Transfer method of the Server object:
|
by: ruca |
last post by:
Hi,
Can anyone tell me please how can I return values from a popup to a
UserControl. I use the same "method" like to return to a WebForm, but it not
works in UserControl case.
I have this code to return from popup to webform:
------------------------------------------------------------------------
sbScript.Append("<script language='javascript'>")
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |