ラベル login の投稿を表示しています。 すべての投稿を表示
ラベル login の投稿を表示しています。 すべての投稿を表示

2012年3月28日水曜日

Response.redirect - display text in same page.

Hi guys,

I am using A.aspx , B.aspx and C.aspx pages.

From A.aspx I am calling b.aspx via Ajax code. After (Check Login user from database) success status , I am tryint o redirecting to C.aspx. But

C. aspx page content is dispalying in A.aspx. It suppose to be redirec to C.aspx. What I am dong wrong here..??

any suggessions ??

hello.

well, i'mo not following you. can you be more specific?


I am trying to check the Loginuser permissions from the Database. Once he get success permission the page has to redirect to new page.
here is my Code.

Login.aspx (a.aspx) - Enter user id & pwd and click Submit then below code executes


function CheckUser()
{
if (preLoginCheck())
{ var url = serverName+"checkLogUser.aspx?userID="+ document.frmDefault.txtUid.value +"&Pwd="+ document.frmDefault.txtPwd.value;
xmlHttp = GetXmlHttpObject(ChangeHandler);
xmlHttp_Get(xmlHttp, url);
}
}


function ChangeHandler()
{ if (xmlHttp.readyState == 4 || xmlHttp.readyState == 'complete')
{ var getData=xmlHttp.responseText;
if (getData=="Success")
{ document.getElementById("ErrorCode").innerText=" GoooooooooooooooD";
}
else
{
document.getElementById("ErrorCode").innerText=getData; //" Invalid User name /Password";
}
}
}

checkLogUser.aspx (b.aspx) - Ajax will execute this page from here itself I want to redirec to Third Page..


If (tmpUserID <> "" And tmpUserPwd <> "") Then
crapObj = New CRAPManagement
getLogInStatus = crapObj.checkLoginUserAccess(tmpUserID, tmpUserPwd)
If getLogInStatus = "Success" Then
Response.Redirect("UserCreate.aspx") --> C.Aspx
Else
Response.Write(getLogInStatus)
End If
End If

Finanl result is C.Aspx page content is displaed in Login.aspx Page.


hello.

well, if you're using asp.net 2.0, then check the authenticationservice class:

http://www.asp.net/ajax/documentation/live/ClientReference/Sys.Services/AuthenticationServiceClass/default.aspx


Hello,
I could't understand wha should I do exactly...!


hello.

well, instead of writing your own code for making the remote call and then having to build your page on the server that has server logic for authenticating a user, you'll get that for free with the service i've showed you in the previous post (it'll authenticate by using forms authentication and it'll automatically use the current defined membership provider you've set up on the server side).

2012年3月21日水曜日

RoundedCornersExtender NOT working with Login control

When the page renders the login control exists for a brief millisecond and then it's gone. Any ideas? Does this extender just not work woth the Login control?

<cc1:RoundedCornersExtender ID="RoundedCornersExtender1" BehaviorID="RoundedCornersBehaviorExtender1" runat="server" TargetControlID="CarrierLogin" Radius="6" Corners="All" />

Hi,

I think it has something to do with the login control is rendered in a table. You can put the login control in a panel and use the panel as the target control .

Hope this helps.


Post deleted.


Ummm, sort of. But what I would like is for the rounded corners to look like this: https://login.yahoo.com/config/login?.src=fpctx&.done=http://www.yahoo.com

Can this be achieved with the RoundedCornersExtender?

Robert W.


Hello,

I saw it the other day and was able to reproduce the effect after putting the Login Control in a Panel and Rouding the Panel corners. it works pretty good and cost ... only a panel .


I sense we're perhaps talking about two different things. What I want is a white or light coloured background and a thin black line as a border. Then I want the RoundedCornersExtender to round that. I cannot get this to work. Could you point me to some sample code?

Robert


well , if we are talking about the same login page on yahoo, here is my code.

<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:ScriptManager runat="server" ID="ScriptmanagerTest"> </asp:ScriptManager> <div style="padding: 20px; text-align: center"> <asp:Panel runat="server" ID="PanelTest" BackColor="#f5f7f7" Width="300px"> <asp:Login runat="server" ID="roundedLogIn"> </asp:Login> </asp:Panel> <cc1:RoundedCornersExtender ID="RoundedCornersExtender1" runat="server" TargetControlID="PanelTest" BorderColor="black" Radius="4"> </cc1:RoundedCornersExtender> </div> </form></body></html>

Hmmm, I'm not sure what I did wrong but your way works perfectly. Thank you!!!

Robert


Glad i could help!