Pregunta

I have already read through this. However, in my case the page I am posting to is an external .aspx page.

Basically I generate XML data on the source page code with XElement, and need to POST that to an external .aspx page. The requirement say it needs to be wrapped in HTML </form> tag before posting. So my string in the code-behind file looks like

<FORM id="frmLogin" action="https://illustration.sagicorlifeusa.com/fse5/main/FormPost.aspx" method="post" target=blank>

    <XML>myxml<XML\>

    <input type="submit" name="__exclude__Submit" value="Run Sagicor Life Illustration Software Online     ">
</form>  

Now on the code-behind file, what is it that I need to do, to post this to the external .aspx page?

¿Fue útil?

Solución

You can add a hidden input, set its value in codebehind and post the form to the destination page so that on that page the value can be extracted back. Did i understand your question?

Otros consejos

That doesn't make sense. You normally don't post HTML code.

You should check the requirement for what they really want. My guess is that you would put it in an HTML tag if you post it from the browser, but that would not apply if you post it from the server.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top