473,320 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Reusing textbox value in another form

In my project, i need to use a textbox value in another form, so how to make it global?
Jan 21 '12 #1
4 1768
PsychoCoder
465 Expert Mod 256MB
Instead of global(which can lead to issues at times) why not just pass it in the QueryString?
Jan 21 '12 #2
Can you be more specific. I dont know how to do that.
Jan 22 '12 #3
People plz answer to this.This is urgent
Jan 25 '12 #4
Hi people, i got the answer of my doubt. Am sharing the answer over here.
Expand|Select|Wrap|Line Numbers
  1. protected void Button1_Click(object sender, EventArgs e)
  2.     {
  3.         Response.Redirect("default.aspx?val=" + TextBox1.Text);
  4.     }
On the another page value can be set as;

Expand|Select|Wrap|Line Numbers
  1. protected void Page_Load(object sender, EventArgs e)
  2.     {
  3.         TextBox2.Text = Request.QueryString["val"];   
  4.     }
Jan 25 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Paul T. Rong | last post by:
Hello there, I have tried all day but in vain....here is the problem: Form1: there are 50 labels (so far, the number is subject to change), each label caption is a fruit or a vegetable, for...
1
by: RD | last post by:
How can I get a value from a textbox on another form? Thanks RD
0
by: kesk | last post by:
Hi, I am a learner in vb.net who is designing a database project. I dont have formal vb.net training, i learned from database books only, to the most extent its good. I have seen on dbl-clicking...
2
by: Atreju | last post by:
Ok I got form within a c sharp page. Situation: On the form I have a drop downliwst and a textbox, the dropdownlist is populated with products and the textbox has a default vale of the product...
11
by: Gilberto | last post by:
Hello I have two forms: Projects and Engineering In PROJECTS i have a textbox (VARIANT1) where the user will enter some text. I want this text to automatically appear as text on another TEXTBOX...
2
by: Gilberto | last post by:
Hello, this is my situation: On the first form (PROJECTS) i have a textbox (PROJECTNAME) which the user enters when opening the database. On a second form (ENGINEERING) i have a list of...
10
by: pt36 | last post by:
Hi I have a page with a form and a textbox. before to submit the form I want to chek if the inserted value in the textbox is already present in a database. So I need to pass the textbox value...
3
by: vzrandom | last post by:
Hi guys, I have one easy question for you. I have class with public static variable. I enter value in one form (in this public static variable) and when I passed it to another form in textbox I...
1
by: sprad | last post by:
I try to copy value of textbox from one form to another textbox of another form when checkbox is checked. So did anybody have idea how to do it.Please reply me as soon as possible. Thanks..
2
by: Rob Dunkley | last post by:
i get the error "An object reference is required for the non-static field, method, or property" when i try to use form2.textbox1.text i have two forms main and advanced. in advanced there is...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.