Quantcast
Channel: Web Forms
Viewing all articles
Browse latest Browse all 23244

ClientScript.RegisterClientScriptBlock

$
0
0

Hello,

For some reason I cannot get the following to work

ClientScript.RegisterClientScriptBlock(this.GetType(), "Javascript", "RespondToRequest();", true);

The above line should be executing the following:

<script type="text/javascript">
    function RespondToRequest() {
        alert("in RespondToRequest");
        frmNT.submit();
    };
</script>

However, nothing happens. A POST of form data should be sent to a page (see below), but this never happens. Can someone please point out what I am doing wrong.

    <form action="http://someHost/siteName/Pages/Login.aspx" id="frmNT" name="frmNT" method="post" enctype="application/x-www-form-urlencoded">
    <div>
        <input type="hidden" name="uid" id="uid" value="someUserName" runat="server" />
    </div>
    </form>

 

 


Viewing all articles
Browse latest Browse all 23244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>