Results 1 to 2 of 2

Thread: pass value from aspx page to html page

  1. #1
    Join Date
    Sep 2013
    Posts
    10

    pass value from aspx page to html page

    is there a way to send a value from an aspx page to html page ?

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: pass value from aspx page to html page

    I think that you will be able to pass data from aspx page to html page in the GET method. Check the below code for example:

    Code:
    Response.Redirect("testing.htm?val1=einstein_007");
    Below is the testing.htm page with the following example:
    Code:
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title></title>
        <script language ="javascript" >
       
    function GetParam(name) {
     
      var start=location.search.indexOf("?"+name+"=");
      if (start<0) start=location.search.indexOf("&"+name+"=");
      if (start<0) return '';
      start += name.length+2;
      var end=location.search.indexOf("&",start)-1;
      if (end<0) end=location.search.length;
      var result='';
      for(var i=start;i<=end;i++) {
        var c=location.search.charAt(i);
        result=result+(c=='+'?' ':c);
      }
      return unescape(result);
    }
     
    function f1() {
        document.getElementById("resdiv").innerHTML = GetParam('val1');
    }
    </script> 
        
    </head>
    <body onload ="f1()">
    <div id="resdiv"></div>
     
    </body>
    </html>

Similar Threads

  1. How to Pass data from one page to another in PHP?
    By Aldous in forum Software Development
    Replies: 3
    Last Post: 25-09-2009, 03:21 PM
  2. How to jump down in a Html page
    By Ron1 in forum Software Development
    Replies: 2
    Last Post: 13-06-2009, 06:14 PM
  3. How to embed a WMV into an html page
    By Ameyaa in forum Software Development
    Replies: 2
    Last Post: 19-05-2009, 10:37 AM
  4. how to pass the dataset from one page to another page in Asp.Net
    By kaartik in forum Software Development
    Replies: 3
    Last Post: 27-12-2008, 05:29 PM
  5. page's HTML preload
    By screwball in forum Software Development
    Replies: 5
    Last Post: 24-09-2008, 05:56 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,555,930.38630 seconds with 17 queries