Passing data to another project

V

Vik

From a Web page, I need to open another page created in another project and
pass some object (a database connetion) to that page. Looks like the second
project has its own Application and Session states.

Thanks.
 
G

Guest

Vik,
Seems a bit strange, but you could certainly pass a connection string on the
querystring to the other app and have its respective page read it back out,
then open the same connection using the connection string.
Peter
 
S

Steve C. Orr [MVP, MCSD]

I do not recommend passing a precious database connection to another
application even if its possible, which I kind of doubt.
You could pass a connection string via post or querystring, but if the
connection string has a password in it then that would be a big security
no-no.
It would be better to pass a connection string server side if possible,
perhaps through a shared file or database.
 
S

Swanand Mokashi

That is why the connectionstrings are in the web.config really -- I am still
not sure why there is a need for "sharing" of db connection

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
 
V

Vik

I developed a Web page, which allows performing some standard operations on
the different tables (with the identical structure). I want to call this
page from the different Web applications connected to the different
databases.
Now I have a copy of that common page in every application but I try to make
a separate project for this page and share it among the applications.
I don't want to pass the connection string in the querystring. I may also
need to pass other objects (not strings).

Vik
 
S

Swanand Mokashi

Looks like you need a "class library" not a page -- the class library can
have your common code and it can referenced to any web project you like.

--
Swanand Mokashi
Microsoft Certified Solution Developer (.NET) - Early Achiever
Microsoft Certified Application Developer (.NET)

http://www.dotnetgenerics.com/
DotNetGenerics.com -- anything and everything about Microsoft .NET
technology ...

http://www.swanandmokashi.com/
http://www.swanandmokashi.com/HomePage/WebServices/
Home of the Stock Quotes, Quote of the day and Horoscope web services
 
V

Vik

I use class libraries. But in this case I need not only the code but the
common page with UI .

Vik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top