473,657 Members | 2,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Passing Data

Hello,

I want to pass the Calendar.Select edDate to another page. But I dont
want to do it with either in the QueryString or HiddenField. Is there
another approach you can come up?

Thanks in advance.

Aug 14 '06 #1
2 1275
You can use sessions this is a solution that work on both ASP.NET 1.x and
ASP.NET 2.0
the other solution is useing Cross Page Post Back. this will transfer you
page viewstate to the postback page target.
You use this by doing the following:
1)Set the PostBackUrl property of your button to the target Page
2) in your target Page use PreviousPage to get your control value like this:
DateTime dtm = (Calendar)Previ ousPage.FindCon trol("Calendar1 ").SelectedDate ;

make sure that you check for PreviousPage is not NULL before use it.

Hope this would help
Regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"Dot Net Daddy" wrote:
Hello,

I want to pass the Calendar.Select edDate to another page. But I dont
want to do it with either in the QueryString or HiddenField. Is there
another approach you can come up?

Thanks in advance.

Aug 14 '06 #2
Thank you for your help.

I first tried to use the 2nd solution, cross page post backs, which
looked easier to me (since I didnt have any information about
Sessions), but it didnt work. The part after the FindControl expression
was not recognized by the VS2005. and since I didnt know what to import
(Imports System. what?) I made a search and after reading, which
lasted about 2 minutes, an article about sessions now it works fine.

this is what I used, in case anyone wonders:

Protected Sub LinkButton2_Cli ck(ByVal sender As Object, ByVal e As
System.EventArg s) Handles LinkButton2.Cli ck
Session.("selec tedDate") = Calendar1.Selec tedDate
Response.Redire ct(URL as String)
End Sub
Muhammad Mosa wrote:
You can use sessions this is a solution that work on both ASP.NET 1.x and
ASP.NET 2.0
the other solution is useing Cross Page Post Back. this will transfer you
page viewstate to the postback page target.
You use this by doing the following:
1)Set the PostBackUrl property of your button to the target Page
2) in your target Page use PreviousPage to get your control value like this:
DateTime dtm = (Calendar)Previ ousPage.FindCon trol("Calendar1 ").SelectedDate ;

make sure that you check for PreviousPage is not NULL before use it.

Hope this would help
Regards
--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"Dot Net Daddy" wrote:
Hello,

I want to pass the Calendar.Select edDate to another page. But I dont
want to do it with either in the QueryString or HiddenField. Is there
another approach you can come up?

Thanks in advance.
Aug 14 '06 #3

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

Similar topics

8
3958
by: Alex Vinokur | last post by:
Various forms of argument passing ================================= C/C++ Performance Tests ======================= Using C/C++ Program Perfometer http://sourceforge.net/projects/cpp-perfometer http://alexvn.freeservers.com/s1/perfometer.html
58
10120
by: jr | last post by:
Sorry for this very dumb question, but I've clearly got a long way to go! Can someone please help me pass an array into a function. Here's a starting point. void TheMainFunc() { // Body of code... TCHAR myArray; DoStuff(myArray);
3
4748
by: Simon Harvey | last post by:
Hi, In my application I get lots of different sorts of information from databases. As such, a lot of information is stored in DataSets and DataTable objects. Up until now, I have been passing around chunks of data in DataTables/DataSets, simply because that was the format that they were in when the data was taken from the database. Now, I know this maybe a pretty silly question with a standard "it depends" answer, but I'm going to...
9
2295
by: Just Me | last post by:
PARAFORMAT2 is a structure that SendMessage will return stuff in. Is the "ref" correct or since only a pointer is being passed should it be by value? Suppose I was passing data rather then receiving it, would that change the answer to the above?
3
2679
by: Marc Castrechini | last post by:
First off this is a great reference for passing data between the Data Access and Business Layers: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/Anch_EntDevAppArchPatPrac.asp I use my own classes in the Business layer. I want to keep the Data Access layer from requiring these classes so I tried passing a Datarow between the layers and it seems to work good for me. Constructing the datarow in the Class...
22
25575
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to compile. <WebMethod()> _ Public Function VerifySku(ByVal skus As XmlDataDocument) As DataSet Test program : Dim cartSet As DataSet cartSet = ws.VerifySku(cartSet)
12
2677
by: Andrew Bullock | last post by:
Hi, I have two classes, A and B, B takes an A as an argument in its constructor: A a1 = new A(); B b = new B(a1);
7
3297
by: TS | last post by:
I was under the assumption that if you pass an object as a param to a method and inside that method this object is changed, the object will stay changed when returned from the method because the object is a reference type? my code is not proving that. I have a web project i created from a web service that is my object: public class ExcelService : SoapHttpClientProtocol {
3
2428
by: DaTurk | last post by:
If I call this method, and pass it a byte by ref, and initialize another byte array, set the original equal to it, and then null the reference, why is the original byte array not null as well? I thought passing by reference, your passing the address in memory. public bool DoSomething(ref byte data) { byte retVal = null; try
3
1726
by: iu2 | last post by:
Hi all, I need your professional opinion about this. It is more a general programming dilemma rather then a C++ one, but since the project I write is in C++... We handle big structs of data. We also write them to files for use by other teams. Here it goes - we use these files also as a means of passing the data to other stages in our own program.
0
8821
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...
0
8723
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 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...
1
8502
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
8602
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...
1
6162
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
5632
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();...
0
4150
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...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
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 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.