Click here to Skip to main content
15,908,173 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: How to improve security? Pin
Martin Haesemeyer22-Sep-02 6:45
Martin Haesemeyer22-Sep-02 6:45 
GeneralRe: How to improve security? Pin
zhoujun22-Sep-02 21:09
zhoujun22-Sep-02 21:09 
GeneralWeb.config Pin
Rickard Andersson2021-Sep-02 23:45
Rickard Andersson2021-Sep-02 23:45 
GeneralRe: Web.config Pin
Uwe Keim22-Sep-02 0:48
sitebuilderUwe Keim22-Sep-02 0:48 
Generalpls help me Pin
Anonymous20-Sep-02 20:11
Anonymous20-Sep-02 20:11 
GeneralRe: pls help me Pin
Stephane Rodriguez.20-Sep-02 21:57
Stephane Rodriguez.20-Sep-02 21:57 
GeneralSorry this Login Script Version Pin
User 4886920-Sep-02 7:07
User 4886920-Sep-02 7:07 
GeneralRe: Sorry this Login Script Version Pin
Enrico Elizar Samuel21-Sep-02 4:59
Enrico Elizar Samuel21-Sep-02 4:59 
If anyone knows how this could be done better or used in one page or something, can you let me know as I'm just starting out in asp.net

Hi,

You could just have one page to serve the purpose. This 'postback' feature, is actually the beauty of ASP.NET (in my opinion) Roll eyes | :rolleyes:

Here is a sample code in VB.NET. Sorry I'm not familiar with C#, but you could adapt the code easily.

<script runat="server">

Sub Page_Load(obj as Object, e as EventArgs)
  'Put any code to execute here during page load

End Sub

Sub btnLogin_Click(obj as Object, e as EventArgs)
  'Retrieve username and password using these codes
  Dim strUserName as String
  Dim strPassword as String
  strUserName = txtUserName.Text
  strPassword = txtPassword.Text

  'Put your authentication code here, eg. access database


End Sub

</script>

<html>
<head>
<title>Login Page</title>
</head>
<body>
<form runat="server">
<p>User name: <asp:TextBox id="txtUserName" runat="server" />
<p>Password: <asp:TextBox id="txtPassword" textmode="password" runat="server" />
<p><asp:Button id="btnLogin" text="Login" onClick="btnLogin_Click" 
runat="server" />
</form>
</body>
</html>



Enrico
GeneralRe: Sorry this Login Script Version Pin
Rickard Andersson2021-Sep-02 23:38
Rickard Andersson2021-Sep-02 23:38 
GeneralRe: Sorry this Login Script Version Pin
User 4886922-Sep-02 6:50
User 4886922-Sep-02 6:50 
Generallogin script Pin
User 4886920-Sep-02 7:05
User 4886920-Sep-02 7:05 
GeneralWierd Problem Pin
John Pepper20-Sep-02 5:27
John Pepper20-Sep-02 5:27 
GeneralRe: Wierd Problem Pin
Paul Watson20-Sep-02 5:47
sitebuilderPaul Watson20-Sep-02 5:47 
GeneralRe: Wierd Problem Pin
akula20-Sep-02 6:09
akula20-Sep-02 6:09 
GeneralRe: Wierd Problem Pin
akula20-Sep-02 13:06
akula20-Sep-02 13:06 
GeneralButton Onclick does not work! Pin
George Ma20-Sep-02 2:19
George Ma20-Sep-02 2:19 
GeneralRe: Button onclick does not work! Pin
Paul Watson20-Sep-02 3:29
sitebuilderPaul Watson20-Sep-02 3:29 
GeneralRe: Button onclick does not work! Pin
George Ma27-Sep-02 4:02
George Ma27-Sep-02 4:02 
GeneralRe: Button onclick does not work! Pin
Megan Forbes22-Sep-02 9:41
Megan Forbes22-Sep-02 9:41 
GeneralRe: Button onclick does not work! Pin
George Ma27-Sep-02 4:11
George Ma27-Sep-02 4:11 
GeneralFind Pin
Anonymous20-Sep-02 1:12
Anonymous20-Sep-02 1:12 
QuestionHow to use JSP or Javascript to get resolution rate? Pin
George Ma19-Sep-02 19:22
George Ma19-Sep-02 19:22 
AnswerRe: How to use JSP or Javascript to get resolution rate? Pin
Paul Watson19-Sep-02 21:19
sitebuilderPaul Watson19-Sep-02 21:19 
GeneralRe: How to use JSP or Javascript to get resolution rate? Pin
George Ma20-Sep-02 2:37
George Ma20-Sep-02 2:37 
GeneralPop up a child page at the specified location of parent page. Pin
George Ma19-Sep-02 17:43
George Ma19-Sep-02 17:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.