Welcome to Jordev Sign in | Join | Help
 
in Search

Something With HTTPs and URL?!!!

Last post 11-01-2007, 8:55 AM by meywd. 4 replies.
Sort Posts: Previous Next
  •  10-24-2007, 11:20 AM 1472

    Something With HTTPs and URL?!!!

    hi everybody,

    i am having  a little problem here, i wish anybody could help me with it,

    i want to send some parameters to a page, that page will do something to those parameters. BUT i dont want to redirect my current page to that page,, i just wanna send those parameters to it. for example imagine that i am now on "CurrentPage.aspx", in the code of "CurrentPage.aspx.vb" i want to call "TheSocondPage.aspx" with some parameters just like this "TheSecondPage.aspx?param1=True&param2=100".

    i dont want to user Response.Redirect BECAUSE i dont want my page to be redirected to the second page, i just want to save some data using "TheSeoncPage.aspx.vb".

    I am Using ASP2.0,  if any body could help me i would realy appreciate it, also a code samples will be a great help.

    Thanks.

     

  •  10-26-2007, 7:21 AM 1473 in reply to 1472

    Re: Something With HTTPs and URL?!!!

    Hi,

    Actually you are asking about technique known as a feature in .NET Framework 2.0, you can called it "Client Callback" or "Ajax" in the Web 2.0 Terms...

    This technique allows you to programmatically call server-side methods through client-side JavaScript code without the need for posting back the page, and note that this kind of callbacks allowed from the client side script using supported scripting language like Javascript, Jscript, or Vbscript...

    This technique use a a well supported protocol called XMLHTTP ActiveX Object which is supported in the Open Source Browsers.

    Find below a simple example:

    function RetrieveMicrosoftPage() {
       var XmlHttp = new ActiveXObject("Msxml2.XMLHTTP.4.0");
       XmlHttp.Open("GET", "http://www.Microsoft.com", false);
       XmlHttp.Send();
       return XmlHttp.responseText;
    }

     you can determine the type of Web Page Calling (Get/Post) and you can send the parameters with the strings.

     

    For more information find below a list of solid articles and resources about this subject:

    http://www.codeproject.com/aspnet/ClientCallBackAspNet2.asp

    http://msdn.microsoft.com/msdnmag/issues/04/08/cuttingedge/

    http://www.w3schools.com/dom/dom_http.asp

    *** http://developer.apple.com/internet/webcontent/xmlhttpreq.html ***


    Mohamed Saleh
    Senior Software Engineer
    http://jordev.net/blogs/mohkanaan/
    Filed under: , ,
  •  10-28-2007, 6:25 AM 1475 in reply to 1473

    Re: Something With HTTPs and URL?!!!

    what you need is Server.Transfer

    see this Server.Transfer Vs. Response.Redirect: http://www.developer.com/net/asp/article.php/3299641


    Mahmoud Darwish, Software Developer.( ASP.NET, VC#, AJAX, XML, VB.NET)
  •  10-30-2007, 3:56 PM 1476 in reply to 1475

    Re: Something With HTTPs and URL?!!!

    Hi,

    I think what he means that he want to call another page just to save data without changing the current Page, if he use server.transfer the application will presist the variables and parameters but it will not keep the same page and this will not solve the probelm...

    Please correct me if iam in the wrong track.

     

    Cheers,

    MAS


    Mohamed Saleh
    Senior Software Engineer
    http://jordev.net/blogs/mohkanaan/
  •  11-01-2007, 8:55 AM 1477 in reply to 1476

    Re: Something With HTTPs and URL?!!!

    server.transfare calls the other page, but it doesn't change the page for the user, so he will call the other page load method as a normal function
    Mahmoud Darwish, Software Developer.( ASP.NET, VC#, AJAX, XML, VB.NET)
View as RSS news feed in XML
Powered by Community Server (Commercial Edition), by Telligent Systems