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.

Recommended Answers

All 7 Replies

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 ?

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.

ooh ok i see.

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

ooh ok i see.

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

You have the answer?

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

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

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.