I am developing an ASP MVC 3 application and I have a div which contains a page from a Python application. This Python application does a given service which creates a result that I want to use in my ASP MVC application.
How can I get this variable.
PS : The Python application uploads a video on dalymotion and the result is the URL of the uploaded file. The upload works fine but I cannot get the URL.
Any ideas ?
Thanks.
EDIT :
This is how I call the Python application from the ASP MVC application :
function uploadVideo(url, target) {
window.ht = setTimeout(function () {
var div = document.getElementById(target);
div.innerHTML = '<iframe frameborder="0" src="' + url + '" />';
}, 20);
}
And this is the form in the python application :
<form method="post" action="{{ upload_url|safe }}" onsubmit="openProgressBar(); return true;" enctype="multipart/form-data" target="uploadframe">
<input type="file" name="file" />
<input id="urlEmbedOC2" val="" />
<input type="submit" name="submit" value="Upload"/>
</form>
I try to put the url inside that “urlEmbedOC2” input, but I can’t access it from the ASP application.
EDIT :
I manage to do it like this : From the Python application, I use redirection to an action in my ASP application, I put the variable in a query string and then I can access it in my controller.
You can let the Python application provide the data through a webservice with a URL which the ASP.NET application can consume.