This is a migrated thread and some comments may be shown as answers.

AsyncUpload Unable to Activate Dialog In WebBrowser Control

5 Answers 144 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Joe
Top achievements
Rank 1
Joe asked on 03 Jan 2013, 09:41 PM
Hello, I am attempting to automate file upload using a third party site. The site is using AsyncUpload. I am able to manually click on the Telerik control to activate the Dialog. But unable to activate the Dialog using VB.Net and the WebBrowser control (See screen shot attachment).

Thank you very much for help!

3rd Party HTML Section:
<tr align="top"> 
    <td nowrap="nowrap" align="right"><font color="#ff0000">*</font> File:</td> 
    <td> 
    <div id="ctl00_ContentPlaceHolder1_SendFile" class="RadAsyncUpload RadUpload RadUpload_Default"> 
        <input id="ctl00_ContentPlaceHolder1_SendFile_ClientState" name="ctl00_ContentPlaceHolder1_SendFile_ClientState" type="hidden" /> 
    </div> 
    </td>
</tr>
<tr> 
    <td align="right" colspan="2"><input type="image" name="ctl00$ContentPlaceHolder1$ibSendBatchSubmit" id="ctl00_ContentPlaceHolder1_ibSendBatchSubmit" class="ibBatchSendSubmit" src="images/btn_send.gif" alt="Send Batch" style="border-width:0px;" /></td>
</tr>

vb.net logic:

WebBrowser.Document.GetElementById("ctl00_ContentPlaceHolder1_SendFile_ClientState").InvokeMember(

 

"click")

I also tried using the <div> ID "ctl00_ContentPlaceHolder1_SendFile" class without success

 



5 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 07 Jan 2013, 01:59 PM
Hello Joe,

 
Unfortunately such behavior is not supported because of browser security limitations. hope this will explain the issue.

Regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Joe
Top achievements
Rank 1
answered on 15 Jan 2013, 10:25 PM
This is unfortunate indeed!

The similar dialog provided by the IE browser is allowing the click event to occur.

I don't see how allowing the click event is a security issue.
0
Plamen
Telerik team
answered on 16 Jan 2013, 12:48 PM
Hi,

 If I understood you right you are trying to upload files dynamically-this behavior is not supported with any input at all -you can only achieve is after a manual click over the upload control.

Hope this will explain the issue.

Kind regards,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Moshab
Top achievements
Rank 1
answered on 09 Dec 2014, 08:12 AM
Hi,

If simulation of click is not supported. Can I call the method which allows upload a file ?
0
Plamen
Telerik team
answered on 10 Dec 2014, 06:06 AM
Hello,

Unfortunately no -both behaviors -click and calling the method are browser limitation- if you want to upload a file you need to click manually on the upload control.

Hope this will explain the issue.

Regards,
Plamen
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
AsyncUpload
Asked by
Joe
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Joe
Top achievements
Rank 1
Moshab
Top achievements
Rank 1
Share this question
or