How to display Name to new page after register and login ASP.net using VB
I have database
ID autoincrement,
Name Varchar,
Username Varchar,
Password Varchar (notMD5)
Case: I want to display the name who register and login on the new page as Hello "Name" in ASP.net using VB.
Component:
Signupaspx
Textbox name is nmText,
Textbox Username is usrText,
Password Textbox is pwdText
Loginaspx
Username is userText,
Password is passText
Helloaspx
Label for display the name is LogsuccesText
Please help me....
asp.net vb.net
add a comment |
I have database
ID autoincrement,
Name Varchar,
Username Varchar,
Password Varchar (notMD5)
Case: I want to display the name who register and login on the new page as Hello "Name" in ASP.net using VB.
Component:
Signupaspx
Textbox name is nmText,
Textbox Username is usrText,
Password Textbox is pwdText
Loginaspx
Username is userText,
Password is passText
Helloaspx
Label for display the name is LogsuccesText
Please help me....
asp.net vb.net
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06
add a comment |
I have database
ID autoincrement,
Name Varchar,
Username Varchar,
Password Varchar (notMD5)
Case: I want to display the name who register and login on the new page as Hello "Name" in ASP.net using VB.
Component:
Signupaspx
Textbox name is nmText,
Textbox Username is usrText,
Password Textbox is pwdText
Loginaspx
Username is userText,
Password is passText
Helloaspx
Label for display the name is LogsuccesText
Please help me....
asp.net vb.net
I have database
ID autoincrement,
Name Varchar,
Username Varchar,
Password Varchar (notMD5)
Case: I want to display the name who register and login on the new page as Hello "Name" in ASP.net using VB.
Component:
Signupaspx
Textbox name is nmText,
Textbox Username is usrText,
Password Textbox is pwdText
Loginaspx
Username is userText,
Password is passText
Helloaspx
Label for display the name is LogsuccesText
Please help me....
asp.net vb.net
asp.net vb.net
edited Nov 26 '18 at 13:12
Cheva
asked Nov 25 '18 at 16:04
ChevaCheva
11
11
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06
add a comment |
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06
add a comment |
1 Answer
1
active
oldest
votes
try this,
Login.aspx
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
User Name
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="Login" />
</td>
</tr>
Login.aspx.vb
Protected Sub Login(ByVal sender As Object, ByVal e As EventArgs)
Session("UserName") = Me.txtUserName.Text.Trim()
Response.Redirect("~/Home.aspx")
End Sub
Home.aspx Html
<div>
<asp:Label ID="lblWelcomeMessage" Text="" runat="server" />
</div>
Home.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.IsPostBack Then
If Session("UserName") IsNot Nothing Then
Me.lblWelcomeMessage.Text = String.Format("Welcome {0}", Session("UserName").ToString())
End If
End If
End Sub
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53469295%2fhow-to-display-name-to-new-page-after-register-and-login-asp-net-using-vb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
try this,
Login.aspx
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
User Name
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="Login" />
</td>
</tr>
Login.aspx.vb
Protected Sub Login(ByVal sender As Object, ByVal e As EventArgs)
Session("UserName") = Me.txtUserName.Text.Trim()
Response.Redirect("~/Home.aspx")
End Sub
Home.aspx Html
<div>
<asp:Label ID="lblWelcomeMessage" Text="" runat="server" />
</div>
Home.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.IsPostBack Then
If Session("UserName") IsNot Nothing Then
Me.lblWelcomeMessage.Text = String.Format("Welcome {0}", Session("UserName").ToString())
End If
End If
End Sub
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
add a comment |
try this,
Login.aspx
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
User Name
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="Login" />
</td>
</tr>
Login.aspx.vb
Protected Sub Login(ByVal sender As Object, ByVal e As EventArgs)
Session("UserName") = Me.txtUserName.Text.Trim()
Response.Redirect("~/Home.aspx")
End Sub
Home.aspx Html
<div>
<asp:Label ID="lblWelcomeMessage" Text="" runat="server" />
</div>
Home.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.IsPostBack Then
If Session("UserName") IsNot Nothing Then
Me.lblWelcomeMessage.Text = String.Format("Welcome {0}", Session("UserName").ToString())
End If
End If
End Sub
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
add a comment |
try this,
Login.aspx
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
User Name
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="Login" />
</td>
</tr>
Login.aspx.vb
Protected Sub Login(ByVal sender As Object, ByVal e As EventArgs)
Session("UserName") = Me.txtUserName.Text.Trim()
Response.Redirect("~/Home.aspx")
End Sub
Home.aspx Html
<div>
<asp:Label ID="lblWelcomeMessage" Text="" runat="server" />
</div>
Home.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.IsPostBack Then
If Session("UserName") IsNot Nothing Then
Me.lblWelcomeMessage.Text = String.Format("Welcome {0}", Session("UserName").ToString())
End If
End If
End Sub
try this,
Login.aspx
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
User Name
</td>
<td>
<asp:TextBox ID="txtUserName" runat="server" />
</td>
</tr>
<tr>
<td>
Password
</td>
<td>
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnLogin" runat="server" Text="Login" OnClick="Login" />
</td>
</tr>
Login.aspx.vb
Protected Sub Login(ByVal sender As Object, ByVal e As EventArgs)
Session("UserName") = Me.txtUserName.Text.Trim()
Response.Redirect("~/Home.aspx")
End Sub
Home.aspx Html
<div>
<asp:Label ID="lblWelcomeMessage" Text="" runat="server" />
</div>
Home.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Not Me.IsPostBack Then
If Session("UserName") IsNot Nothing Then
Me.lblWelcomeMessage.Text = String.Format("Welcome {0}", Session("UserName").ToString())
End If
End If
End Sub
answered Nov 28 '18 at 12:23
Bharath_DeveloperBharath_Developer
1797
1797
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
add a comment |
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
Thanks bro, Solved
– Cheva
Nov 29 '18 at 13:17
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53469295%2fhow-to-display-name-to-new-page-after-register-and-login-asp-net-using-vb%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Hi and welcome to SO. Post the code you have tried and you will get clarified.
– preciousbetine
Nov 25 '18 at 17:40
ASP.NET Session State Overview: "...session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application..."
– Andrew Morton
Nov 25 '18 at 21:06