Umbraco switching to https and calling a code behind event on login
Have the below code to
switch requests from ‘http’ to ‘https’ when user clicks on a button. This is to
protect user/password info before it is sent to the server. In the server,
should call the code behind associated to the button but is not doing it. On
pages that are NOT under Umbraco this code works fine.
If put this code in an
Umbraco page, when click on the login button the request changes to ‘https’,
page is post to the server but the btnLogin_Click event is NOT called.
Is there something
need to change to make this work in Umbraco? Does anybody know a solution /
work around to make ‘btnLogin_Click’ to be executed? Or any idea where I can
look to find the problem?
The 'WebForm_DoPostBackWithOptions' does not
seem to work in Umbraco (at least on this case). To do the 'http' to 'https' change had to trick
the call changing 'theForm.action' to https.
Umbraco switching to https and calling a code behind event on login
Have the below code to switch requests from ‘http’ to ‘https’ when user clicks on a button. This is to protect user/password info before it is sent to the server. In the server, should call the code behind associated to the button but is not doing it. On pages that are NOT under Umbraco this code works fine.
Control:
<asp:ImageButton ID="btnLogin" runat="server" OnClick="btnLogin_Click" ... />
Code behind:
protected void Page_Load(object sender, EventArgs e)
{
PostBackOptions pbOptions = new PostBackOptions(btnLogin);
pbOptions.ActionUrl = Request.Url.ToString().Replace("http://", "https://");
btnLogin.Attributes.Add("onclick", "this.disabled = true; + Page.ClientScript.GetPostBackEventReference(pbOptions) + ";");
}
protected void btnLogin_Click(object sender, ImageClickEventArgs e)
{
…
}
If put this code in an Umbraco page, when click on the login button the request changes to ‘https’, page is post to the server but the btnLogin_Click event is NOT called.
Is there something need to change to make this work in Umbraco? Does anybody know a solution / work around to make ‘btnLogin_Click’ to be executed? Or any idea where I can look to find the problem?
Thanks
The 'WebForm_DoPostBackWithOptions' does not seem to work in Umbraco (at least on this case). To do the 'http' to 'https' change had to trick the call changing 'theForm.action' to https.
hi there,
i am having the same problem do any body got the solution for the above problem.
is working on a reply...