Rank: Member
Groups: Administration
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?
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,659
Thanks: 5 times Was thanked: 76 time(s) in 74 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: |
Best regards, Fedor Skvortsov
|
|
|
|
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???
|
|
|
|
Rank: Advanced Member
Groups: Administration
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.
|
|
|
|
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.