0

I have a control page on which I am setting certain parameters which I want to control. The page is in aspx and when i click submit i want that data on the textbox of an .htmpage. As in html I dont have C# file so how do I do this?

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <iframe src="http://10.112.90.131/index.htm" border="0" frameborder="0" height="600" width="800"></iframe> </asp:Content> 
2
  • Where is this HTML-file, on the server or somewhere else? Commented Nov 27, 2013 at 9:14
  • remote server. actually I am dealing with two servers. the aspx page will store the data into the sql server and simultaneously i want it on the html page as well. Commented Nov 27, 2013 at 9:15

1 Answer 1

1

I think you should use aspx page instead of html although you can transfer value through aspx to html through query string and parse query string through JQuery / JavaScript.

Suppose Below is the Query String from aspx page to open Html page.

http://stackoverflow.com/ShowData.htm?firstname=jhon 

Now JQuery / JavaScript code on remote html would be:-

 $(function () { //Setting textbox value to jhon as per querystring $("#SomeTextBoxID").val(getParameterByName("firstname")); } function getParameterByName(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } 
Sign up to request clarification or add additional context in comments.

7 Comments

Thanks for the answer but the for me I have to use html page as the second server apart from my main server where this page is located is not supporting aspx. It only supports html. So just to be clear the aspx and html both are in different server
I unable to understand it? Clarify me how will you open it (Remote html page) .. Suppose a user submitted the information on aspx and you want to open and display entered aspx data on a remote html page, ie. domain hosted on another server. is that correct?
Yeah, What actually my thought is (totally hypothetical) I can redirect it on to the that page(html situated in another server) on the button click and after may be somehow I can copy/display the data on the html page
So what are the odds.. Just send info in query string just like this somedomain.com/ShowData.htm?firstname=jhon ....Either Redirect to the html page or open remote html as a popup check this ans: show external page into model pop up stackoverflow.com/questions/12137033/…
A thought just pop up in my mind that can I call that html page using <iframe> within the aspx page?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.