Saturday, March 31, 2012

Submitting IFrame in asp.net

hi
I have this situation where I need to do some server side execution
without posting the page.
I used to do this in asp using IFrame, but it's not working in asp.net.
I had a form and iframe element in the web page as follow:
<form id=MainForm ...>
this is the form that the user see
</form>
<form id= myForm method=post action="form.aspx" target="myHiddenFrame">
<input type=hidden id=hiddenField>
</form>
<iframe id="myHiddenFrame" src=PortfolioName.aspx name="myHiddenFrame"
style="width:0px; height:0px; border: 0px"></iframe>
then I had a javascript function: window.myForm.submit();
It seems that i can't put target="myHiddenFrame", the target can only be
_self, _parent...
How can I submit in an IFrame element ?
regards
*** Sent via Developersdex http://www.examnotes.net ***
Don't just participate in USENET...get rewarded for it!iframe is working in asp.net in the regular way. It just has to sit inside a
form. And there can be only one form in a page. And there should be
runat=server set for the form tag.
Eliyahu
"Naim" <anonymous@.devdex.com> wrote in message
news:%23YXooBz7EHA.3592@.TK2MSFTNGP09.phx.gbl...
> hi
> I have this situation where I need to do some server side execution
> without posting the page.
> I used to do this in asp using IFrame, but it's not working in asp.net.
> I had a form and iframe element in the web page as follow:
> <form id=MainForm ...>
> this is the form that the user see
> </form>
> <form id= myForm method=post action="form.aspx" target="myHiddenFrame">
> <input type=hidden id=hiddenField>
> </form>
> <iframe id="myHiddenFrame" src=PortfolioName.aspx name="myHiddenFrame"
> style="width:0px; height:0px; border: 0px"></iframe>
> then I had a javascript function: window.myForm.submit();
> It seems that i can't put target="myHiddenFrame", the target can only be
> _self, _parent...
> How can I submit in an IFrame element ?
> regards
>
> *** Sent via Developersdex http://www.examnotes.net ***
> Don't just participate in USENET...get rewarded for it!

0 comments:

Post a Comment