954,515 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Vb.net Help!!!!!

hi
i have a numericupdown box on my first form and in the next form i want the number selected in the numericupdown box to produced that number of text boxs in the next form.

jimmer12
Newbie Poster
4 posts since Jan 2008
Reputation Points: 10
Solved Threads: 0
 

u mean that value from the numericupdown will read in next from?
i suggest to use public shared variable to accomodate the value from numericupdown.then u can call the variable in other form.

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

is it a web application or a regular program?

if it is a regular program:

dim whatever as integer
whatever = form1.dropdownlist1.selectedvalue

if it is a web application, pass the value

on the first form:

Context.Items.Add("VAL", dropdownlist1.selectedvalue)
Server.Transfer("~/form2.aspx", True)

on the second form

dim whatever as integer
whatever = Context.Items("VAL")

ericstenson
Posting Whiz in Training
Team Colleague
295 posts since Dec 2007
Reputation Points: 14
Solved Threads: 29
 

you cannot call controls directly cause friends status of controls.even if you change the modifiers to public. so i suggest to use public shared variable. you can access this variable form other form...
this declaration of the variable :

Public Shared value As Integer

this assignment value from NumericUpDown1 to value :

value = NumericUpDown1.Value

this code to call this variable in other form:

Label1.Text = Form1.value
Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 
hi i have a numericupdown box on my first form and in the next form i want the number selected in the numericupdown box to produced that number of text boxs in the next form.


ans;
if it s windows application,use below code in form2
text box.text=form1.numericupdown.value

anansiva
Newbie Poster
4 posts since Jan 2008
Reputation Points: 10
Solved Threads: 1
 

you can do this as.......

on form2 load

textbox1.text=form1.textBox1.text

just try this i think you can solve your problem easily

for any kind of web related information you can visit
http://webdesigningcompany.net

bector
Newbie Poster
13 posts since Jan 2008
Reputation Points: 7
Solved Threads: 2
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You