HTML/.ASPX/.NET-- 1)I need help with knowing where the session is suppose to be
ID: 3833763 • Letter: H
Question
HTML/.ASPX/.NET--
1)I need help with knowing where the session is suppose to be inputted in a project so it can search "aUser" in a allUserList and if found put into the session ... Session["currentuser"]= aUser;
2)Also how to write a code using AutoPostBack for a text box and if the user they type in exist they can search in the allUsersList and return a message box.
Using the Session State (Requirement However, if a user (parent) is logged in YOU that users from the Application state and put when a user is logged in, that user has its own domain. It it into the state shared by all In ike in Application contain its are NOT logged in state. So you must n user that it being search for the the Application state and put that object into the session. So first you need to get the list of Users from the Application ListExplanation / Answer
Both 1 & 2 answers included... please check..
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
protected void TextBox_Changed(object sender, System.EventArgs e)
{
dim aUser
For Each aUser in allUserList
if i == TextBox12.Text Then
Session["currentuser"]= aUser
ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "alert('user already exists.. please login');", true);
End If
Next
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="program1" runat="server">
<title>Login data</title>
</head>
<body>
<form id="form12" runat="server">
<div>
<h2>TextBox AutoPostBack example</h2>
<asp:TextBox
ID="TextBox12"
runat="server"
BackColor="LavenderBlush"
AutoPostBack="true"
>
</asp:TextBox>
</div>
</form>
</body>
</html>
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.