Hi,
I need to pass a value from one Web Form to another. In Form #1 I have set up a web control (hyperlink) that in its "Transfer" property contains the name of the Web Form to be loaded. How can I read the listIndex of a Listbox in Form #1 when the Form#2 is loaded?
Thanks
Mike 4 1559
You can make a public property on Form #1 which reads it and returns it. Or, why not just pass it as a request item to Form#2?
"Mike" <no****@nospam. com> wrote in message news:us******** *****@tk2msftng p13.phx.gbl...
Hi,
I need to pass a value from one Web Form to another. In Form #1 I have set up a web control (hyperlink) that in its "Transfer" property contains the name of the Web Form to be loaded. How can I read the listIndex of a Listbox in Form #1 when the Form#2 is loaded?
Thanks
Mike
When another form loads, the first one's gone. No public property, nothing. Whatever you want to pass, you should put either into the request or session variables.
Eliyahu
"Rick Spiewak" <ri*********@mi ndspring.com> wrote in message news:uQ******** ******@TK2MSFTN GP09.phx.gbl...
You can make a public property on Form #1 which reads it and returns it. Or, why not just pass it as a request item to Form#2?
"Mike" <no****@nospam. com> wrote in message news:us******** *****@tk2msftng p13.phx.gbl...
Hi,
I need to pass a value from one Web Form to another. In Form #1 I have set up a web control (hyperlink) that in its "Transfer" property contains the name of the Web Form to be loaded. How can I read the listIndex of a Listbox in Form #1 when the Form#2 is loaded?
Thanks
Mike
On Mon, 12 Jul 2004 14:36:16 +0200 in
microsoft.publi c.dotnet.framew ork.aspnet, "Mike" <no****@nospam. com>
wrote: Hi,
I need to pass a value from one Web Form to another. In Form #1 I have set up a web control (hyperlink) that in its "Transfer" property contains the name of the Web Form to be loaded. How can I read the listIndex of a Listbox in Form #1 when the Form#2 is loaded?
Why not use Session variables?
Form1:
Session.Add("My Value", "123");
// load form 2
Form2:
void Page_Load(objec t sender, System.EventArg s e)
{
string myval = Session["MyValue"].ToString();
}
Roger
Check out this faq, http://www.extremeexperts.com/Net/FA...tInASPNET.aspx
--
Saravana
Microsoft MVP - ASP.NET www.extremeexperts.com
"Mike" <no****@nospam. com> wrote in message news:us******** *****@tk2msftng p13.phx.gbl...
Hi,
I need to pass a value from one Web Form to another. In Form #1 I have set up a web control (hyperlink) that in its "Transfer" property contains the name of the Web Form to be loaded. How can I read the listIndex of a Listbox in Form #1 when the Form#2 is loaded?
Thanks
Mike This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Richard |
last post by:
**** Post for FREE via your newsreader at post.usenet.com ****
HI,
I am working on a project where I need to input data to a (local) HTML page
using multiple form elements, such as text, radio, checkbox, and dropdown.
When the form Submit button is clicked, I then need the input data either
written to another location on the same page, or written to another page (a
different frame would be fine)
|
by: domeceo |
last post by:
can anyone tell me why I cannot pass values in a setTimeout function
whenever I use this function it says "menu is undefined" after th
alert.
function imgOff(menu, num) {
if (document.images) {
document.images.src = eval("mt" +menu+ ".src")
}
alert("imgOff_hidemenu");
hideMenu=setTimeout('Hide(menu,num)',500);
|
by: Al Jans |
last post by:
Hi, I'm having a problem passing a value from a field on one form to
another field on another form. The value is being passed between
forms, however it's not being displayed and i've got no idea why.
Any suggestions or help would be appreciated.
Thanks
Alex Jans
|
by: Johnny |
last post by:
I'm a rookie at C# and OO so please don't laugh! I have a form
(fclsTaxCalculator) that contains a text box (tboxZipCode) containing a zip
code. The user can enter a zip code in the text box and click a button to
determine whether the zip code is unique. If the zip code is not unique,
another form/dialog is displayed (fclsLookup) - lookup form/dialog. The zip
code is passed to the lookup form/dialog by reference. I then load a...
|
by: michael |
last post by:
let me keep it clean, quick and simple.
I am passing a variable into another window and am reassigning the
value on the new page -
window.document...value = opener.document.
....value
and am wanting to then use this value within an element of a form on
the current page -
| |
by: Deano |
last post by:
Apparently you can only do this with one value i.e Call
MyAssetLocationZoom(Me!txtLocation, "Amend data")
This runs;
Public Sub MyAssetLocationZoom(ctl As Control, formName As String)
On Error GoTo err_zoom
strFormName = formName
|
by: AMP |
last post by:
Hello,
I have this in form1:
namespace Pass
{
public partial class Form1 : Form
{
public Form2 form2;
public Form1()
{
|
by: itarizin |
last post by:
Today I found as ignorance owe me..
Let me explain what I'm tring to do and fail (fail: in my needs)
For example, I've my stupid class:
public class Hello
{
private int x = 0;
public Hello()
|
by: idsanjeev |
last post by:
SIR I AM PASSING VALUE FROM ONE FORM TO ANOTHER FORM THROUGH COOKIES BUT IS CAN ONLY TRANSFER LAST VALUE
HOW CAN PASS VALUE AFTER CLICKIN ON LINK
I AM USING THE CODE IS
FOR LINK
<td><a href=voicereply.asp?opt1=<%=R("top_id")%>>Reply</a></td>
FOR STORING IN COOKIES
response.cookies("vtopid")=R("top_id")
TO PASS ON NEXT PAGE AND WANT TO INSERT TOPID IN TO TABLE
FOR DISLAY
|
by: John Sheppard |
last post by:
Hello there I was wondering if anyone could help me,
I am trying to pass a typed dataset to a dialoged child form by reference.
I have binding sources sitting on the child form. So to refresh them I just
set their datasource. I am guessing this is probably what is causing the
problem. Is there a better way to do this?
Anyway this all works happily and things show up when the record already
exists but I have 2 problems ;
1) When I add...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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: 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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |