473,734 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Create an instance of one webform on another webform

Hi I have start web form and when the user clicks a button (server.transfe r)
they are directed to the second webform. I was wondering if there is a way
to create an instance of the first webform on the second webform? I have a
base webform class that both webforms inherit
webform1 : BaseWebclass
webform2 :BaseWebclass

so I do not think I can just inherit webform1 in webform2
thanks
--
Paul G
Software engineer.
Jun 27 '08 #1
5 2556
Hello Paul,

What's your requirements? What exactly do u want to get?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PHi I have start web form and when the user clicks a button
P(server.transf er)
Pthey are directed to the second webform. I was wondering if there is
Pa way
Pto create an instance of the first webform on the second webform? I
Phave a
Pbase webform class that both webforms inherit
Pwebform1 : BaseWebclass
Pwebform2 :BaseWebclass
Pso I do not think I can just inherit webform1 in webform2 thanks
P>
Jun 27 '08 #2
Hi thanks for the response. I was trying to pass values from one webform to
another and found a method of setting properties on the source webform and
using server.transfer and using the properties on the destination webform to
get the values. This requires creating an instance of the source webform on
the destination webform. I ended up just using the query string where the
parameters are in the URL. Many of the pages inherit from a masterpage class
so probably can not just inherit the source page objects into the destination
page.
--
Paul G
Software engineer.
"Michael Nemtsev [MVP]" wrote:
Hello Paul,

What's your requirements? What exactly do u want to get?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PHi I have start web form and when the user clicks a button
P(server.transf er)
Pthey are directed to the second webform. I was wondering if there is
Pa way
Pto create an instance of the first webform on the second webform? I
Phave a
Pbase webform class that both webforms inherit
Pwebform1 : BaseWebclass
Pwebform2 :BaseWebclass
Pso I do not think I can just inherit webform1 in webform2 thanks
P>
Jun 27 '08 #3
Hello Paul,

You need to use Crosspage postback feature of asp.net 2.0 http://msdn.microsoft.com/en-us/library/ms178139.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PHi thanks for the response. I was trying to pass values from one
Pwebform to another and found a method of setting properties on the
Psource webform and using server.transfer and using the properties on
Pthe destination webform to get the values. This requires creating an
Pinstance of the source webform on the destination webform. I ended
Pup just using the query string where the parameters are in the URL.
PMany of the pages inherit from a masterpage class so probably can not
Pjust inherit the source page objects into the destination page.
P>
P"Michael Nemtsev [MVP]" wrote:
P>
>Hello Paul,

What's your requirements? What exactly do u want to get?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

PHi I have start web form and when the user clicks a button
P(server.trans fer)
Pthey are directed to the second webform. I was wondering if there
is
Pa way
Pto create an instance of the first webform on the second webform?
I
Phave a
Pbase webform class that both webforms inherit
Pwebform1 : BaseWebclass
Pwebform2 :BaseWebclass
Pso I do not think I can just inherit webform1 in webform2 thanks
P>

Jun 27 '08 #4
thanks will give it a try. The post back (to the new page) is conditional
but this should not cause any complications.
--
Paul G
Software engineer.
"Michael Nemtsev [MVP]" wrote:
Hello Paul,

You need to use Crosspage postback feature of asp.net 2.0 http://msdn.microsoft.com/en-us/library/ms178139.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PHi thanks for the response. I was trying to pass values from one
Pwebform to another and found a method of setting properties on the
Psource webform and using server.transfer and using the properties on
Pthe destination webform to get the values. This requires creating an
Pinstance of the source webform on the destination webform. I ended
Pup just using the query string where the parameters are in the URL.
PMany of the pages inherit from a masterpage class so probably can not
Pjust inherit the source page objects into the destination page.
P>
P"Michael Nemtsev [MVP]" wrote:
P>
Hello Paul,

What's your requirements? What exactly do u want to get?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

PHi I have start web form and when the user clicks a button
P(server.transf er)
Pthey are directed to the second webform. I was wondering if there
is
Pa way
Pto create an instance of the first webform on the second webform?
I
Phave a
Pbase webform class that both webforms inherit
Pwebform1 : BaseWebclass
Pwebform2 :BaseWebclass
Pso I do not think I can just inherit webform1 in webform2 thanks
P>


Jun 27 '08 #5
thanks for the information, was able to get it to work. Still have one minor
problem as I have a dropdown list and button on the source page and only want
selecting the button to post to the new page if the dropdown list box on the
source page selected index is not set to 0. I am thinking a custom validator
for the button with the selected control being the dropdown list box may work
but not sure what to use for the client side script.
--
Paul G
Software engineer.
"Michael Nemtsev [MVP]" wrote:
Hello Paul,

You need to use Crosspage postback feature of asp.net 2.0 http://msdn.microsoft.com/en-us/library/ms178139.aspx

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
PHi thanks for the response. I was trying to pass values from one
Pwebform to another and found a method of setting properties on the
Psource webform and using server.transfer and using the properties on
Pthe destination webform to get the values. This requires creating an
Pinstance of the source webform on the destination webform. I ended
Pup just using the query string where the parameters are in the URL.
PMany of the pages inherit from a masterpage class so probably can not
Pjust inherit the source page objects into the destination page.
P>
P"Michael Nemtsev [MVP]" wrote:
P>
Hello Paul,

What's your requirements? What exactly do u want to get?

---
WBR,
Michael Nemtsev [.NET/C# MVP] :: blog:
http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

PHi I have start web form and when the user clicks a button
P(server.transf er)
Pthey are directed to the second webform. I was wondering if there
is
Pa way
Pto create an instance of the first webform on the second webform?
I
Phave a
Pbase webform class that both webforms inherit
Pwebform1 : BaseWebclass
Pwebform2 :BaseWebclass
Pso I do not think I can just inherit webform1 in webform2 thanks
P>


Jun 27 '08 #6

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

Similar topics

6
2140
by: Phillip N Rounds | last post by:
I have a webform, from which I have to submit info to another site. Their instructions are to have a html form, with the following as the submit: <form method="post" action="http://www.theirsite.htm"> <input type=hidden name="field1" value="value1"> <input type=hidden name="field2> value="value2> <input type="submit" value="Click Me"> On my web form, I have numerous web controls ( all runat="server"), one of which is a button which...
2
13759
by: Andrew | last post by:
I am trying to set the column information - which ones I want displayed and how with the web grid control. The interface has some big differences when compared to the winform. Is this possible without having the dataset match ? I think yes... but ... here's how I approached it: ( create new DataGridColumns, add properties and then add each to the data grid. BUT I get an error when I try this: ...
1
1421
by: Melson | last post by:
Hi Can anyone give me suggestion. I've 10 tables in MS SQL. Each table has primary key and different fields in each table. I need to create ASPNET webform to add and update each table. What I'm thinking is to create 1 webform for each table. So the project will have 10 webform to add and edit each table. I don't think this is a good design. Does anyone have a better solution. Pls help. Thanks.
6
2300
by: Frank Wilson | last post by:
Tom, It sounds to me like ASP, not ASP.NET is handling the request for WebForm1.aspx. This is most likely an IIS config issue that may have been caused by order of installation or reinstallation, or possibly even something that happened in IIS before .NET was installed. Here is a way to prove or disprove my theory:
5
1585
by: Alex Nitulescu | last post by:
Hi. Because I'm a beginner in creating controls, I spent more than two *&^#$ hours to create this "login" as a custom control and to make it work properly: _________________________________________________________________________________________________________ Imports System.ComponentModel Imports System.Web.UI Imports System.Web.UI.WebControls <Description("Provides a login component"), DefaultProperty(""),
4
2159
by: jesper_lofgren | last post by:
Hi there, I have some webcontrols that i want to add dynamically on a page. I have stored the path / namespace in database (ex MyNameSpace.WebControls.Control1) to the class/webcontrol. Lets say i have a column in database that looks like this. PageID (int) Webcontrol (varchar) 1 MyNameSpace.WebControls.Control1
2
2983
by: Luqman | last post by:
How can I open another WebForm in ASP.Net / VS 2005 without closing the Current Webform. I tried using Server.Transfer("Form2.Aspx",True) on Button_Click of Form1 but it close the current web form and opened the form2, and when I click on the button on form2 which had Server.Transfer("Form1.Aspx"), the form1 initialized and all the values of form1 controls set to blank, any idea please ? My Form1 has some textboxes and a search...
1
3104
by: almurph | last post by:
Hi everyone, I have an APS.NET (v1.1) type button on a webform page. What I want it to do is when the user clicks it, it then calls another webform page that appears in a pop-up window. Now I know that the button has an "onclick" attribute but that's as far as I get. I guess you need some Javascript and something in the code behind file (which for me is VB.NET) but I don't know what.
4
6914
by: Vlad | last post by:
I am having problems using the file.create method within a function that is called when looping through an array of filepaths. If I call my function with a hardcoded file path --C:\Temp.txt the function creates the file as expected. When I loop through my array I get the error - "ArgumentException was unhandled - Illegal characters in path" The value "C:\Temp.txt" is the first value in the array - as it works
0
8946
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, 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...
0
9449
Oralloy
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...
1
9236
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,...
0
9182
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 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...
0
8186
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, 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...
1
6735
isladogs
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...
0
4550
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...
1
3261
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
2
2724
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.