Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
jmearle  
#1 Posted : Thursday, December 6, 2007 10:43:28 AM(UTC)
jmearle

Rank: Member

Groups: Member
Joined: 12/5/2007(UTC)
Posts: 2

Heylo,

I was wondering if anybody can help me figure out how to dynamically update the RedirectURL coded within the javascript you embed in an aPage.aspx, from the codebehind code (aPage.aspx.cs) associated with the aPage.aspx?

I can't see a way to update the <% albumiID %> in the example below from my .aspx.cs codebehind logic.


Code:
//Configure URL files are uploaded to.
iu.addParam("Action", "upload.aspx");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "albumDetails?albumId=<%= albumID %>");

Edited by user Monday, February 25, 2008 3:24:08 PM(UTC)  | Reason: Not specified

James Earle
jmearle  
#2 Posted : Thursday, December 6, 2007 9:35:39 PM(UTC)
jmearle

Rank: Member

Groups: Member
Joined: 12/5/2007(UTC)
Posts: 2

OK, I read the redirectURL documentation, and understand to use the get property, but that doesn't answer the question I asked -- which was

How can I pass the variable value from the .aspx.cs codebehind page to the javascript in the .aspx page?
James Earle
Alex Makhov  
#3 Posted : Sunday, December 9, 2007 11:51:00 AM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

You use correct syntax. What error do you receive?

BTW, you can use Image Uploader ASP.NET Control also.

In this you case you can set RedirectUrl property right from codebehind:

Code:
ImageUploader1.RedirectUrl = "albumDetails?albumId=" + albumID;

Edited by user Monday, February 25, 2008 3:29:45 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.