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

Notification

Icon
Error

Options
Go to last post Go to first unread
eg_hch  
#1 Posted : Monday, July 6, 2009 12:13:50 PM(UTC)
eg_hch

Rank: Member

Groups: Member
Joined: 6/13/2006(UTC)
Posts: 22

I am trying to use ImageUploader 6.0 in my asp.net application
I found that the FileUploaded event will only submit the ImageUploader data, but not the other form data
for example, if i have a textbox1 on the page, and i try to use the textbox1.Text in ImageUploader1_FileUploaded event
it will always be empty string
and also it will not run the Page_Load event

I want to ask, is there anyway that I can config the ImageUploader control to behave like the other server controls?
Fedor  
#2 Posted : Monday, July 6, 2009 7:46:42 PM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,550

Thanks: 5 times
Was thanked: 59 time(s) in 58 post(s)
Hello,

Quote:
I am trying to use ImageUploader 6.0 in my asp.net application
I found that the FileUploaded event will only submit the ImageUploader data, but not the other form data
for example, if i have a textbox1 on the page, and i try to use the textbox1.Text in ImageUploader1_FileUploaded event
it will always be empty string
and also it will not run the Page_Load event

I want to ask, is there anyway that I can config the ImageUploader control to behave like the other server controls?


Image Uploader posts data to server in separate request (like asynchronous AJAX call). By default Image Uploader uploads its own POST fields only without ASP.NET form fields.

If you want to upload additional data to server, then you should use ImageUploader.AddField Method method:

Code:
<script type="text/javascript" src="iuembed.js"></script>                       
 
<script type="text/javascript">

function beforeUploadHandler() {
    getImageUploader("ImageUploader").AddField("name1", document.getElementById("<%=textbox1.ClientID%>").value);
}

var iu = new ImageUploaderWriter("ImageUploader", 600, 500);

// ...Other params...

iu.addEventListener("BeforeUpload", "beforeUploadHandler");

// ...Other params...

iu.writeHtml();


On server side you can get field value using Request.Form collection:

Code:
Request.Form["name1"]
Best regards,
Fedor Skvortsov
MartinMoreno  
#3 Posted : Tuesday, December 6, 2011 5:32:35 PM(UTC)
MartinMoreno

Rank: Newbie

Groups: Member
Joined: 12/6/2011(UTC)
Posts: 4

Thanks: 1 times
eg_hch wrote:
I am trying to use ImageUploader 6.0 in my asp.net application
I found that the FileUploaded event will only submit the ImageUploader data, but not the other form data
for example, if i have a textbox1 on the page, and i try to use the textbox1.Text in ImageUploader1_FileUploaded event
it will always be empty string
and also it will not run the Page_Load event

I want to ask, is there anyway that I can config the ImageUploader control to behave like the other server controls?




HI eg_hch, HOW YOU SOLVE THIS PROBLEM???
Dmitry.Obukhov  
#4 Posted : Wednesday, December 7, 2011 2:21:47 AM(UTC)
Dmitry.Obukhov

Rank: Advanced Member

Groups: Member
Joined: 5/29/2010(UTC)
Posts: 1,310

Thanks: 8 times
Was thanked: 111 time(s) in 111 post(s)
Hello,

Please read Fedor's reply.
Best regards,
Dmitry Obukhov

Technical Support. Aurigma, Inc.
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.