Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Sep 01, 2011 11:35 AM by GerEielts
Participant
830 Points
175 Posts
Aug 29, 2011 01:08 PM|LINK
Hi
This problem is driving me crazy, despite googling, searching etc
In VB.net I have a form (called Stats) with a textbox and a button
Default value of the textbox = "AAA"
With a buttonclick I have the following code
Private Sub btnTesten_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTesten.Click Call Algemeen.TestRef() End Sub
Algemeen is a module as follows:
Public Function TestRef()
effe = new Stats ''''éffe has been already declared as public in another Module (Public effe As Stats)
effe.TextBox1.Text = "BBB"
End Function
When the app returns to the form Stats the Textbox1.text is still 'AAA' in stead of 'BBB'
What am I doing wrong ?
Help is appreciated
Star
7826 Points
1320 Posts
Aug 29, 2011 01:45 PM|LINK
Hi,
How to set the initial value ("AAA")?
if you are assign the initial values using Page_Load, set the value within the IsPostBack condition.
Aug 29, 2011 02:00 PM|LINK
Thanks for fast reply.
It is not ASP.net what I am talking about, it is VB.net (Windows-form).
(I am in the right forum, though?). The value "AAA" is set in the properties in the IDE and I am trying to modify that with aboven mentioned code.
Any idea ?
All-Star
23531 Points
2683 Posts
Microsoft
Sep 01, 2011 07:19 AM|LINK
GerEielts I am in the right forum, though?).
For winform issue please migrate your post to this:
http://windowsclient.net/Forums/
Sep 01, 2011 11:35 AM|LINK
Mamba Dai - MSFT Hi, GerEielts I am in the right forum, though?). For winform issue please migrate your post to this: http://windowsclient.net/Forums/
Thanks, will do
GerEielts
Participant
830 Points
175 Posts
set object reference help needed
Aug 29, 2011 01:08 PM|LINK
Hi
This problem is driving me crazy, despite googling, searching etc
In VB.net I have a form (called Stats) with a textbox and a button
Default value of the textbox = "AAA"
With a buttonclick I have the following code
Private Sub btnTesten_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTesten.Click
Call Algemeen.TestRef()
End Sub
Algemeen is a module as follows:
Public Function TestRef()
effe = new Stats ''''éffe has been already declared as public in another Module (Public effe As Stats)
effe.TextBox1.Text = "BBB"
End Function
When the app returns to the form Stats the Textbox1.text is still 'AAA' in stead of 'BBB'
What am I doing wrong ?
Help is appreciated
gopalanmani
Star
7826 Points
1320 Posts
Re: set object reference help needed
Aug 29, 2011 01:45 PM|LINK
Hi,
How to set the initial value ("AAA")?
if you are assign the initial values using Page_Load, set the value within the IsPostBack condition.
IsPostBack conditionGopalan Mani
My Tech blog
GerEielts
Participant
830 Points
175 Posts
Re: set object reference help needed
Aug 29, 2011 02:00 PM|LINK
Thanks for fast reply.
It is not ASP.net what I am talking about, it is VB.net (Windows-form).
(I am in the right forum, though?). The value "AAA" is set in the properties in the IDE and I am trying to modify that with aboven mentioned code.
Any idea ?
Mamba Dai - ...
All-Star
23531 Points
2683 Posts
Microsoft
Re: set object reference help needed
Sep 01, 2011 07:19 AM|LINK
Hi,
For winform issue please migrate your post to this:
http://windowsclient.net/Forums/
Feedback to us
Develop and promote your apps in Windows Store
GerEielts
Participant
830 Points
175 Posts
Re: set object reference help needed
Sep 01, 2011 11:35 AM|LINK
Thanks, will do