Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Session Variables between ASP & ASP.NET

New Here ,
Aug 09, 2007 Aug 09, 2007
Hi,

i have 2 pages within Dreamweaver which allow a user to enter a vehicle details (Page1.asp) and when clicking next, this saves the record to MS Access, then continues to Page2.aspx which allows image uploads of the vehicle. The upload part works fine but the problem I'm having is associating the uploaded images to the recently created db record by entering in the new record ID to the filenames to the uploaded images.

Example:
ID ImageFile VehicleRecordID
1 \img001.bmp 203
2 \img002.bmp 203
3 \img003.bmp 203
etc...



For example, John Smith logs onto the website, creates a new vehicle & enters the correct information, clicks continue and uploads images for that vehicle, clicks finish. Because the 2 pages are different technologies, ASP & ASP.NET written in VB.NET to upload the images I can't access Session variables such as the current user ID or name, or the newly added record. I hope I am making this clear.

I am wondering if there is anything I am doing wrong or is there a way for a aspx to access session variables created by asp pages????

Thanks for help
Barry
TOPICS
Server side applications
577
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 13, 2007 Aug 13, 2007
> I am wondering if there is anything I am doing wrong or is there a way for
> a
> aspx to access session variables created by asp pages????


Not directly, but you could write your aspx sessions to a db, then access
them again from your asp page (or vice-versa).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 13, 2007 Aug 13, 2007
Just as a workaround possiblity, knock it down if its dumb!

If the ASP.NET page uploads the images and stores the paths to the database, if the user clicks button next that is contained within a form, could I pass the unique image ID that is stored in the DB as a form parameter or a address parameter?

Thanks in advance.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 14, 2007 Aug 14, 2007
It is easy enough to pick up the last number of an inserted record, however
if the site is very busy there is the possibility that you will grab the
wrong ID. While sessions can't be saved between ASP& ASP.Net you can share
cookies.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"BazIreland" <webforumsuser@macromedia.com> wrote in message
news:f9ptr1$gdg$1@forums.macromedia.com...
> Just as a workaround possiblity, knock it down if its dumb!
>
> If the ASP.NET page uploads the images and stores the paths to the
> database,
> if the user clicks button next that is contained within a form, could I
> pass
> the unique image ID that is stored in the DB as a form parameter or a
> address
> parameter?
>
> Thanks in advance.
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 15, 2007 Aug 15, 2007
Sure. Move the insert into a stored procedure. If you're using an identity
column, have the procedure return SCOPE_IDENTITY in an output parameter. If
you're using a GUID, set the output parameter equal to NEWID(), then be sure
to use the parameter value in the insert as well.


"BazIreland" <webforumsuser@macromedia.com> wrote in message
news:f9ptr1$gdg$1@forums.macromedia.com...
> Just as a workaround possiblity, knock it down if its dumb!
>
> If the ASP.NET page uploads the images and stores the paths to the
> database,
> if the user clicks button next that is contained within a form, could I
> pass
> the unique image ID that is stored in the DB as a form parameter or a
> address
> parameter?
>
> Thanks in advance.
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 23, 2007 Aug 23, 2007
LATEST
I've been considering the same type of development in reverse. One strategy you may want to try is a pass-through page. The idea here is to send all your ASP Session paramenters (as form or querystirng variables) to an aspx page, where you'll save them to the .NET Session on the web server, then Redirect or Server.Transfer to the ASP or ASPX page you want to call. Its not the most elegant solution, but it doesn't require any special treatment of the Database or GUIDS/Unique ID's.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines