home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 40 / IOPROG_40.ISO / SOFT / NETFrameworkSDK.exe / comsdk.cab / samples.exe / QuickStart / howto / doc / XSPNet / GET.aspx next >
Encoding:
Text File  |  2000-06-13  |  1.5 KB  |  43 lines

  1. <%@ Register TagPrefix="Acme" TagName="SourceRef" Src="/quickstart/util/SrcRef.aspx"%>
  2.  
  3. <!-- #include virtual="/quickstart/howto/include/header.inc" -->
  4.  
  5. <script language="C#" runat="server">
  6.  
  7.     public void Page_Load(Object sender, EventArgs E) 
  8.     {
  9.         // shell the explorer to a directory
  10.         //Ref.RunSample = Server.MapPath("/quickstart/howto/samples/net/XSPNet");
  11.  
  12.         // run an aspx page directly
  13.          Ref.RunSample = "/quickstart/howto/samples/net/XSPNet/webrequest.aspx";
  14.  
  15.         Ref.ViewSource = "/quickstart/howto/samples/net/XSPNet/webrequest.src";
  16.         Ref.Icon = "/quickstart/images/genicon.gif";
  17.         Ref.Caption = "WebRequest.aspx";
  18.     }
  19.  
  20. </script>
  21.  
  22. <h4>How Do I...Make a GET request within an ASP+ application?</h4>
  23.  
  24. <div class="indent" style="width:660">
  25. <P>
  26. This sample illustrates using the WebRequest and WebResponse classes to make a GET request on a URI form within a ASP+ application.</div>
  27. </P><P>
  28. This example is exactly the same as the command-line example showing a basic GET request with the net classes. The only difference is that this example shows that you can request another URI from within an .aspx page.
  29. </P>
  30. <h4>Example</h4>
  31.  
  32. <Acme:SourceRef id="Ref" runat="server" />
  33.  
  34. <h4>Source Code</h4>
  35.  
  36. <div class="code">
  37. <xmp>
  38. <!-- #include virtual="/quickstart/howto/samples/net/XSPNet/webrequest.aspx" -->
  39. </xmp>
  40. </div>
  41.  
  42. <!-- #include virtual="/quickstart/howto/include/footer.inc" -->
  43.