0

I am just done a program on the vb 2008 express, and do the same program on the vwd 2008 express, but as you knew, the codes on vb 2008 express and on the vwd 2008 express are different, I want to know as sample

Dim strsql As New OleDbConnection("Provider=Microsoft.Jet.Oledb.4.0;Data Source=C:\Users\user\Desktop\honor.mdb")
            Dim cmsql As New OleDbCommand("UPDATE anndep SET deppw = @deppw WHERE depaccount = @depaccount", strsql)

            With cmsql.Parameters
                .AddWithValue("@deppw", TextBox2.Text)
                .AddWithValue("@depaccount", ManagerLogin.TextBox3.Text)---- x
            End With

On the mark x - ManagerLogin.TextBox3.Text, I want to use the textbox3.text value on the Managerlogin.aspx.vb, and vwd 2008 express won't take ManagerLogin (not defined), how to fix this? Thanks.

Edited by nmges: n/a

3
Contributors
7
Replies
8
Views
7 Years
Discussion Span
Last Post by nmges
0

i am a little bit confused by your explanation.

Are you saying , you have created a Windows application that has a TextBox named TextBox3 and you created a Web Application and you want to use the Value of a Windows application the Web Application ?

0

i am a little bit confused by your explanation.

Are you saying , you have created a Windows application that has a TextBox named TextBox3 and you created a Web Application and you want to use the Value of a Windows application the Web Application ?

OK, I have two programs here, one is on the regular windows application, one is on the web application. On the regular windows application, if we want to use the other form value, we just do, sample - form2.text1box.text, and we will get the value, but on the web application, how to define it, it will get error, we cannot code, sample - ManagerLogin.TextBox3.Text, the ManagerLogin needs to be defined? Thanks.

0

ooh ok i see.

So you want to use a Value from one page in another page ?

You have the answer?

0

if that is the case you need to use Sessions like this

Page1

Session["MySessionVar"] = Textbox3.Text;

and if you want to access your session created on Page1 on the other page lets say Page2 then you will have to do it this way

String ValueFromPage1 = Convert.ToString(Session["MySessionVar"]);

Hope this is what you want

0

last post will work for u

basic is save value of textbox in to session variable which is available during full session and while u need that value retrive it from that variable

0

if that is the case you need to use Sessions like this

Page1

Session["MySessionVar"] = Textbox3.Text;

and if you want to access your session created on Page1 on the other page lets say Page2 then you will have to do it this way

String ValueFromPage1 = Convert.ToString(Session["MySessionVar"]);

Hope this is what you want

ok, you said page1, page2 is defualt1.aspx.vb, default2.aspx.vb? right? I just want to use the values from the other form, you know what I am trying to do for my program.

Edited by nmges: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.