I have one single page, in that all the application in terms of user
control will get loaded dynamically. [By calling the LoadControl method]
On one controls I have some rad tab and their page view which also get loaded dynamically to the user control.
After clicking on one tab the images section comes up, where one can see the listing [ in RadListView]
and can upload the images as well.
This is what I have done :
<telerik:RadUpload Localization-Select="Browse" ID="RadUpload" runat="server" ControlObjectsVisibility="AddButton"
MaxFileInputsCount="5" />
I am saving the images to database, but before that I had to disable the ajax, to post the file. For that I had to use this Line of code : StringBuilder js = new StringBuilder();
js = js.Append("function conditionalPostback(sender, args){");
js.Append("if (args.get_eventTarget() == '" + buttonSubmit.UniqueID + "') {alert('hi');");
js.Append("args.set_enableAjax(false);}}");
ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "UploadScript", js.ToString(), true);
I have tried the same js in the aspx page with the RadCodeBlock but its not working. Anyways the main problem is after uploading images first time the file input text area and the browse button got disappears, but the add and upload button remains there.
I have tried it very hard but of no luck...
Please help
Also i thought of another way to reload the whole control again after the post back that way the upload control should treat like it has come first time, but at that time after the postback, if I want to upload more images the RadUpload.UploadedFiles returns the count 0 [Seems like my js has not effected this time]
Please help
One more thing, I have missed above is this string "RadUrid=b086b64a-9a52-4bc3-8a63-5e7565d731ea " gets appended to my url, after the upload image action very first time. Im not sure what is this. And I want to get rid of this as well.[One minor item]. Please help, its urgent. [Client wants to look at this at the earliest ]
Thanks
On one controls I have some rad tab and their page view which also get loaded dynamically to the user control.
After clicking on one tab the images section comes up, where one can see the listing [ in RadListView]
and can upload the images as well.
This is what I have done :
<telerik:RadUpload Localization-Select="Browse" ID="RadUpload" runat="server" ControlObjectsVisibility="AddButton"
MaxFileInputsCount="5" />
I am saving the images to database, but before that I had to disable the ajax, to post the file. For that I had to use this Line of code : StringBuilder js = new StringBuilder();
js = js.Append("function conditionalPostback(sender, args){");
js.Append("if (args.get_eventTarget() == '" + buttonSubmit.UniqueID + "') {alert('hi');");
js.Append("args.set_enableAjax(false);}}");
ScriptManager.RegisterClientScriptBlock(Page, typeof(Page), "UploadScript", js.ToString(), true);
I have tried the same js in the aspx page with the RadCodeBlock but its not working. Anyways the main problem is after uploading images first time the file input text area and the browse button got disappears, but the add and upload button remains there.
I have tried it very hard but of no luck...
Please help
Also i thought of another way to reload the whole control again after the post back that way the upload control should treat like it has come first time, but at that time after the postback, if I want to upload more images the RadUpload.UploadedFiles returns the count 0 [Seems like my js has not effected this time]
Please help
One more thing, I have missed above is this string "RadUrid=b086b64a-9a52-4bc3-8a63-5e7565d731ea " gets appended to my url, after the upload image action very first time. Im not sure what is this. And I want to get rid of this as well.[One minor item]. Please help, its urgent. [Client wants to look at this at the earliest ]
Thanks