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='javas cript'>")
sbScript.Append (Environment.Ne wLine)
sbScript.Append ("window.opener .document.forms[0].elements['")
sbScript.Append (Request.QueryS tring("srcA"))
sbScript.Append ("'].value = '")
sbScript.Append (strYear)
sbScript.Append ("';")
sbScript.Append (Environment.Ne wLine)
sbScript.Append ("window.opener .document.forms[0].elements['")
sbScript.Append (Request.QueryS tring("srcM"))
sbScript.Append ("'].value = '")
sbScript.Append (strMonth)
sbScript.Append ("';")
sbScript.Append (Environment.Ne wLine)
sbScript.Append ("window.opener .document.forms[0].elements['")
sbScript.Append (Request.QueryS tring("srcD"))
sbScript.Append ("'].value = '")
sbScript.Append (strDay)
sbScript.Append ("';")
sbScript.Append (Environment.Ne wLine)
sbScript.Append ("window.close( );")
sbScript.Append (Environment.Ne wLine)
sbScript.Append ("</script>")
RegisterStartup Script("CloseDa te", sbScript.ToStri ng())
------------------------------------------------------------------------
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca 2 1667
Hi,
ruca wrote:
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.
Usually, when something works for a Page but not for a Control, it's an
ID problem. Be aware that when a control gets added to the page, all its
children controls get a different ID from the one set using the ID
attribute. This is to guarantee that all the IDs on the page are unique.
Inspect your produced HTML code using view-source. The control's unique
ID can be obtained on the server using myControl.Clien tID.
I have this code to return from popup to webform:
------------------------------------------------------------------------
sbScript.Append ("<script language='javas cript'>")
Deprecated. Use
<script type="text/javascript">
instead.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
Hi,
But this control is used in many pages
How can I specifief or pass the ID into my UserControl, since is this that
opens my popup????
--
Programming ASP.NET with VB.NET
Thank's (if you try to help me)
Hope can help (if I try to help)
ruca
"Laurent Bugnion" <ga*********@bl uewin.chescreve u na mensagem
news:uo******** ******@TK2MSFTN GP03.phx.gbl...
Hi,
ruca wrote:
>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.
Usually, when something works for a Page but not for a Control, it's an ID
problem. Be aware that when a control gets added to the page, all its
children controls get a different ID from the one set using the ID
attribute. This is to guarantee that all the IDs on the page are unique.
Inspect your produced HTML code using view-source. The control's unique ID
can be obtained on the server using myControl.Clien tID.
>I have this code to return from popup to webform: ------------------------------------------------------------------------ sbScript.Appen d("<script language='javas cript'>")
Deprecated. Use
<script type="text/javascript">
instead.
HTH,
Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
PhotoAlbum: http://www.galasoft-LB.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Nicholas Then |
last post by:
I have a usercontrol that contains a datagrid. This grid
lists information from my database. No big deal...this
works fine, and when the user selects an item I have a
popup window appear with the data that the user can
edit. Now when they click submit on the popup window to
save their changes, can I get the datagrid in the
usercontrol on the parent page to reload. I have been
trying to do this for about a year not and I have never...
|
by: Balamurukan |
last post by:
How to retrive property values from our own property window
|
by: Rabeek Ahamed |
last post by:
I am calling a popup window from the main page.
That popup has to return list of values in an
array. How can i return arrays to main page from pop up?
And I want to list those array of values into a grid.
Can you please give me the list of code?
Advance thanks for your reply.
regards,
|
by: Jorge Ponte |
last post by:
hi
I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In
that WUC I want have a textbox and a button. I want to click on the button
and open a popup (I use javascript for that), the popup window will have also
a text box and a button. when the User click on the button the value on the
textbox will be send back to the textbox on My_WUC. I hope I was clear off
what I want to do.
I've been searching for some ideas...
|
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: Simon Verona |
last post by:
I have a problem, best explained by example.
I have a usercontrol which contains a text box and a button. If the button
is clicked then the calender control is displayed as a "popup" so that a
date can be chosen. This replicates the date-picker control except that it
has other checks in it (my user control also has the ability for other data
types with other "popups" for validation)....
The problem is that if the user control is at...
|
by: Kevin Attard |
last post by:
Hi,
Is there a way to return a value from a control inside a popup and assign it
to a control inside the parent form?
Thanks,
kev
|
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: Academia |
last post by:
ContextMenu has a Popup event but MainMenu does not.
I need Popup with MainMenu.
Do you know anyway to simulate it?
Thanks in advance
|
by: perhapscwk |
last post by:
I use below to popup a page "popup" and then pass the value from popup
and back to my page. see below
However, how to return 2 values? I can return 1 value only.
function openModal() {
retVal=showModalDialog('popup.htm');
valReturned=retVal;
alert('The following text has been returned: "'+valReturned+'"');
}
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
| |
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
| |