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

Notification

Icon
Error

Options
Go to last post Go to first unread
ROBM  
#1 Posted : Tuesday, January 19, 2010 12:34:47 PM(UTC)
ROBM

Rank: Newbie

Groups: Member
Joined: 1/19/2010(UTC)
Posts: 5

For some reason, we are losing the querystring value when we click on the send button to upload the images. We are using ASP.NET and we are not saving cookies. How are we able to keep a value from a querystring?
Tamila  
#2 Posted : Tuesday, January 19, 2010 10:10:31 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

Could you please describe a bit detailed that is the querystring and how do you use it?
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
ROBM  
#3 Posted : Wednesday, January 20, 2010 9:07:47 AM(UTC)
ROBM

Rank: Newbie

Groups: Member
Joined: 1/19/2010(UTC)
Posts: 5

okay this is how I have my code

Dim str as String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
str=request.querystring("id") ' <<<<< str gets a value on page load no problem.
end sub

Protected Sub ImageUploader1_FileUploaded(ByVal sender As Object, ByVal e As FileUploadEventArgs)
Dim tmp as String
tmp=str ' <<<<< it's gone here when I hit the send button on the imageupload
end Sub
Tamila  
#4 Posted : Wednesday, January 20, 2010 9:47:44 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hi,

Thank you for the code. To resolve your problem I recommend you to send "id" value in POST-request along with uploaded files. You can do it using AddField method of Image Uploader. Your code should look in following way:

Clent-side code:
Code:
Dim str as String
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
str=request.querystring("id") ' <<<<< str gets a value on page load no problem.
end sub

... other code

<script type="text/javascript">
    function Before_Upload()
    {
        getImageUploader("<%=ImageUploader1.ClientID%>").AddField("id", str);
    }
</script>

<cc1:ImageUploader ID="ImageUploader1" runat="server" Height="449px"
width="768px"

UploadThumbnail1FitMode="Fit"
UploadThumbnail1Width="120"
UploadThumbnail1Height="120"
OnFileUploaded="ImageUploader1_FileUploaded"
OnClientBeforeUpload="Before_Upload" />

Server-side code:
Code:
Protected Sub ImageUploader1_FileUploaded(ByVal sender As Object, ByVal e As FileUploadEventArgs)
Dim tmp as String
tmp = Request.Form("id")
end Sub

If you have any questions feel free to let us know.

Edited by user Wednesday, January 20, 2010 9:51:26 PM(UTC)  | Reason: Not specified

Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
ROBM  
#5 Posted : Thursday, January 21, 2010 10:00:25 AM(UTC)
ROBM

Rank: Newbie

Groups: Member
Joined: 1/19/2010(UTC)
Posts: 5

I have tried it as you suggested above, I got this error when I hit “Send” button “Error:’str’ undefined? I am using IE.
Tamila  
#6 Posted : Thursday, January 21, 2010 10:44:45 PM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Sorry, It is my fault. Just correct the code as follows:
Code:
function Before_Upload()
{
    getImageUploader("<%=ImageUploader1.ClientID%>").AddField("id", "<%=str%>");
}

Now it should work correctly.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
jgrace  
#7 Posted : Monday, January 25, 2010 1:58:44 AM(UTC)
jgrace

Rank: Newbie

Groups: Member
Joined: 1/22/2010(UTC)
Posts: 1

Compiler Error Message: BC30455: Argument not specified for parameter 'Number' of 'Public Function Str(Number As Object) As String'.

Source Error:



Line 31: function Before_Upload()
Line 32: {
Line 33: getImageUploader("<%=ImageUploader1.ClientID%>").AddField("id", "<%=str %>");
Line 34: }
Line 35: </script>

Tamila  
#8 Posted : Wednesday, January 27, 2010 5:00:39 AM(UTC)
Tamila

Rank: Advanced Member

Groups: Member
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hi,

I recommend you to debug your code, it seems that you have some mistakes in your code. I recommend you to read the following articles:
Aurigma Support Team

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.