How to redirect data to a particular page using url in c#? -


i working on jquery fileupload here saving images once saved data need post page

here have 2 applications (two separate applications) html.page posting images mvc upload controller , had saved image success fully

now respose data need redirect through url redirecting through

 public void returnresult(string jsonobj)        {             var hostname = " http://localhost:8988/cors/postmessage.html?myurl=";            var s = jsonobj;            var filterurl = hostname + s;            httpcontext.current.response.redirect(filterurl);         } 

once redirection page how data?

and don't have idea redirecting data or not how could know data redirecting or not u plz me data

this

redirected page

       <!doctype html>  <html lang="en"> <head> <meta charset="utf-8"> <title>jquery file upload plugin postmessage api</title> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> </head> <body> <script>      'use strict';      var origin = /^http:\/\/example.org/, //var origin = 'http://localhost:4071/upload/uploadhandler.ashx',     target = new regexp('^(http(s)?:)?\\/\\/' + location.host + '\\/');     alert(1);     alert(origin); $(window).on('message', function (e) {     e = e.originalevent;     var s = e.data,         xhr = $.ajaxsettings.xhr(),         f;     if (!origin.test(e.origin)) {         throw new error('origin "' + e.origin + '" not match ' + origin);     }     if (!target.test(e.data.url)) {         throw new error('target "' + e.data.url + '" not match ' + target);     }     $(xhr.upload).on('progress', function (ev) {         ev = ev.originalevent;         e.source.postmessage({             id: s.id,             type: ev.type,             timestamp: ev.timestamp,             lengthcomputable: ev.lengthcomputable,             loaded: ev.loaded,             total: ev.total         }, e.origin);     });     s.xhr = function () {         return xhr;     };     if (!(s.data instanceof blob)) {         f = new formdata();         $.each(s.data, function (i, v) {             f.append(v.name, v.value);         });         s.data = f;     }     $.ajax(s).always(function (result, statustext, jqxhr) {         if (!jqxhr.done) {             jqxhr = result;             result = null;         }         e.source.postmessage({             id: s.id,             status: jqxhr.status,             statustext: statustext,             result: result,             headers: jqxhr.getallresponseheaders()         }, e.origin);     }); }); </script> </body> </html> 

any greately appreciated in advance

if need data query string returned controller in html page can use function.

function geturlvars() {                 var vars = [], hash;                 var hashes = window.location.href.slice(window.location.href.indexof('?') + 1).split('&');                 (var = 0; < hashes.length; i++) {                     hash = hashes[i].split('=');                     vars.push(hash[0]);                     vars[hash[0]] = hash[1];                 }                 return vars;             } 

you can values on page load like:

var myurl= geturlvars()['myurl']; 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -