Get value of variable

 Hi all,

I have a problem such as (C#, webbase, store procedure):

1. I have 3 pages (aspx):

      +  the fist page (login.aspx): when user Login have 2 variable: user and password

      +  the second page (accept term): user modify password and accept term of service, have 3 variable oldpassword, changepassword, term

          i use store procedure Update user Set password=@password where mobile=@mobile

         Now i want value of variable user in The fist page to update, but i don't a way ?

         Anyone  can  help me, thanks very much 

       + the third page: main page



6/17/2007 12:04:20 PM 27051 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 24

Looks like you are not using the membership provider. 

Once the user has logged in in login.aspx, store the user details in the session. session("username")=username

These values will then be available to you as long as the session is valid. 


Dont forget to click "Mark as Answer" on the post that helped you.
6/17/2007 2:19:14 PM


(Solution :

the first page: Session["user"] = txtUser.Text.Trim();

the second page: string user = (string) Session["user"] )




6/18/2007 4:06:58 AM

Similar Artilces:

Getting Value from Client-side InputBox to .net variable
hi, im doing a login page for our timekeeping. Since there's no msgbox available on, im doing it dynamically via javascript. How do i Get the value frm a dynamically written javascript (such as inputbox) to a .net variable? here's the logic of my program, user logs in hits the button and sub-routine Login will be fired, if user is late -- call Check_Late Sub, this is whre the client-side script was built -- then after that i wanted to be able to get the value from an inputbox. '// if button login clicked Sub Login(Sender As Object, E As EventArgs) .......

How to get session variable value into a static variable
Hi, On page preinit i am adding few session variables. Now i want to retrive these session variable values into my static variables. protected void Page_PreInit(object sender, EventArgs e) {Session.Add("T", "Default"); Session.Add("T1", "Red"); Session.Add("T2", "Blue");   }   i have few static variables which shud contain these vaules.  public string TT; public string TT1; public string TextForeColor =sess = "#FFFFFF";   i want to get T value into TT ... T1 into TT1..and so on &n...

how to get variable value by using variable name as parameter???
I have a problem as following; I want to give my variable name as parameter to a function, then get value of that variable. Like this; dim myValue, myVariable, result  as stringmyValue = "demo"myVariable = "myValue"result = SomeMagicFunction(myVariable)then value of result sould be demoI know that is an interesting case. But i need this. :( Please help me !!... If you explain the situation where it is going to be used, there may be some other alternative solution to it. One solution is to store value in a property of a class or structure and then later on use reflection to retrie...

Getting the values of some variables
Hi all, I have a text file that contains a text something like this: This text contains a $aa variable and a $bb variable and a $cc one. My program reads this text and I want to replace the variables with their values, then return the result string. How can I do this? Is using s/(\$\w+)/eval($1)/gse the only solution? (I haven't test it if it works this way yet, but I hope there is a simpler and easier method to evaluate the entire string. Is there such a way? Thank you. Teddy do you use double quotes to interpolate the string ? Octavian Rasnita wrote: ...

How can I get a "variable value" from the "variable name"
Hi All, How can I get a "variable value" from the "variable name" ? For Example: ClassDefinition cd_def VariableDefinition vd_def cd_def = this.classdefinition For li_i = 1 To UpperBound (cd_def.VariableList) vd_def = cd_def.VariableList[li_i] MessageBox ("Variable Name: ", ) MessageBox ("Variable Value: ", "??????????") Next Thanks, Gustavo Which value do you expect to get? pbm_thisusuallydoesnothelp:-)) Philip Salgannik <Gustavo> wrote in message

Field1 value --> variable name ; Field2 value --> variable value (C# code behind)
 I would like to add quantities to variables based on two fields in a table.  The table includes two field names: ingredient, weight.  Assume a simple formulation: add 50 lbs water, add 20 lbs eggs, add 10 lbs water, add 5 lbs salt.The table would have: water, 50 eggs, 20 water, 10 salt, 5The variables water, eggs, water and salt have already been defined. I want something that will cycle through and add the quantities (lbs) to the variable. Ingredients can appear more than once in a formulation--notice that water appears twice and at the e...

compare single-valued-variable with multi-valued-variable
i�d like to compare a value with a list of values from a variable (see var2, where the notation is like regex) and set a local-var to 1 if match is found, else to 0. what i do not know how to compare one value regex-wise. i can make for each value a policy, but is there a more elegant way? <do-set-local-variable name="var2" scope="policy"> <arg-string> <token-text xml:space="preserve">154|155|157|175|330|530|719|745</token-text> </arg-string> </do-set-local-variable> this one should kind of loop through the...

Getting value from a database Into a Variable
Hi This may seem like a stupid question but i was wondering how i went about getting a value from a record in a database and setting it as a variable integer. i am able to send a variable value to the database using cmd.parameters.addwithvalue("@wins", (Score)) which updates the selected row but i am unsure how to get a selected value and set it to a variable. I have not much experience in but i am learning pretty quickly until i get snagged on things like this.   Any help would be much appreciated as its quite frustrating not being able to work it out yourself...If ...

How to get the textbox value in a variable?
Friends I have to get a textbox value into a variable. After that i want to pass the variable here. i wrote this but its not working. variablename=textbox1.text can anyone help me in this issue. thanks in advance. sudhakar > After that i want to pass the variable here. To where are you trying to pass this variable???Alister That should work just fine - - When you say "'s not working." - - Exactly what is happening?David WierMCP/ - where to look first!Please Vote for ASPNet101 - 'Best Communi...

How get value from variable... [Edit]
Hi guys If have meybe little noob question but i must ask for this... I have import wsdl to connect with some webapi. I can connect with my account from tehre and read some kind of info. But when function return info in this api structure i can't read it, i don't have idea to get this data. My code for example function doGetMyAddresses ( <-- specification fro this function : {code} var adress: AddressesInfoStruct; begin adress:=uploader.GetAllegroWebApiPortType.doGetMyAddresses(sesja) {code} a...

getting value of session variable
I'm trying to display the value of a session variable in a label. I know the session variable exists because in my page load event I redirect the user to a different page if it's value is null. I want to display it's value in a label to test some things, but I keep getting an error whenever I try.  Here is my code:   Label:<asp:Label ID="lblSessionTest" runat="server" Text="Label"></asp:Label>  How I'm trying to display it (in my page load event):  lblSessionTest.Text = Session("loggedIn"); &nbs...

problem with get value from textbox after get it value in load page
hi every one  i have problem with my web site when i get textbox value in load page   and Changed textbox the page do not take last value .   it take value in load page   this is code:Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)   TextBox1.Text = "aa" End SubProtected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) MsgBox(TextBox1.Text) End Sub   when i press button message write "aa" while i changed the textbox   please if enyone knowen help me &nbs...

Getting value out of session variable
 Hi,How to get the value of a session. It is storing the dataset value. I dont know how to transfer that to a variable.   private SearchDotnet.Searchs.UserSearch sSite;  if ((sSite == null))          {             sSite = Session["Site"];           }         }  The thing is sSite is  delcared as above. I need to unload the session variable to sSite. Have not found a...

Getting Sql Variable value
Hi,  Looking for a sample in C# (ASP2.0 vwd) of getting a  SqlDataSource Variable (@uNameID) into a string Variable (string uNameID)   Any help would be appreciated!   <asp:SqlDataSource ID="SqlDataSource3" runat="server" OnSelected="SqlDataSource3_Selected"  ConnectionString="<%$ ConnectionStrings:testExpressConnectionString %>"                    SelectCommand="SELECT    userName, userPWD  FROM  user_test where userName=@userName "&g...

Web resources about - Get value of variable -

Variable - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Westpac interest rate rise is one of many variable loan rate rises
WESTPAC is not alone in hitting its owner-occupier customers with a surprise interest rate rise, as dozens of other variable rate home loans ...

Airbnb upgrades variable pricing tool for hosts
Online home rental group Airbnb is rolling out an upgraded variable pricing tool that automatically raises or cuts room rates based on supply ...

Commonwealth Bank raises variable home loan rates
Home owners' mortgage costs are set to rise by hundreds of dollars a year, after the Commonwealth Bank became the latest bank to hike interest ...

CBA lifts variable home loan rates to offset costs associated with stricter capital requirements
The Commonwealth Bank to lift its home loan interest rates independently of the Reserve Bank to partially offset costs associated with stricter ...

Washington Square Signs Spielbergs, Choi Joins Variable and More
... films and an episode of the HBO comedy series "Girls," on which he plays the role of Ray Ploshansky. New York-based creative collective Variable ...

YouTube v10.32 Tweaks Some Interface Elements And Includes Hints About Virtual Reality Content And Variable ...
Forget Update Wednesday! Monday is the new big day. Not only were we treated to the latest M preview release and the official Marshmallow name, ...

"You have to ignore many variables to think women are paid less than men. California is happy to try." ...
Writes Sarah Ketterer in The Wall Street Journal in "The ‘Wage Gap’ Myth That Won’t Die" (which you can get to without subscribing if you Google ...

Expert Reveals the Latest Variable Capacity Technology
Learn about gForce Ultra CRAC equipment, the latest variable capacity technology to lower energy usage and increase reliability.

AD/CVD ruling and overseas capacity expansions are variables to the current PV boom, says EnergyTrend ...
China's National Reform and Development Commission has announced that there will be no significant reduction in feed-in tariff (FiT) rates for ...

Resources last updated: 12/22/2015 12:48:25 AM