473,605 Members | 2,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grab value from public variable in user control

Resending this as own topic as didnt get answer from original. Would be
grateful for a response from anyone that knows. Thanks.

Hi there, I found your post really helpful..but i wondered if, once I have
exposed a public property containing the value of a textbox in a user
control..how do I grab this from the calling page? I cant think of the
syntax, since my page doesnt know the contents of the class (and therefore,
the public properties) of the user control??

Sorry if its blatently obvious!

I am currently getting a value using
Page.FindContro l(usercontrol); usercontrol.Fin dControl...etc etc and am told
this is much slower than the public property route.

Many Thanks, Louise.

"Bruce Wood" wrote:
You should avoid exposing controls within your user control as public
members. I almost wrote "You should never expose..." but I'm not
feeling that cocky.

The way to handle this problem (and it's a common one), is to think
about the user control as a whole. Obviously, it has 30 text boxes for
a reason. What is the sum functionality of the entire user control? Is
it, for example, an application form?

Assuming that it's an application form (for the sake of argument), then
you don't _really_ want to be able to get at the text boxes. What you
_really_ want is to get at the information on the form. So, you could
do that by exposing one public property for each item on the form:

public string LastName
{
get { return this.txtLastNam e.Text; }
set { this.txtLastNam e.Text = value; }
}

Or, you could create a class that would hold all of the application
information, and expose a single property:

public ApplicationInfo rmation ApplicationInfo rmation
{
get { return new ApplicationInfo rmation(this.tx tLastName.Text, ...
); }
set
{
this.txtLastNam e.Text = value.LastName;
...
}
}

Either way, what you've done is expose properties that "talk in the
language of" your user control as a whole. This does two very good
things: 1) it makes the calling code more readable, because callers can
now write code in terms of what the user control does, not in terms of
how it's put together, and 2) it makes the calling code ignorant of the
structure of your user control (loose coupling), so that you can
change, for example, a radio button group to a combo box if that makes
more sense from an interface point of view... all without changing any
calling code. The less your calling code knows about the guts of your
user control, the better.

You can do this with events, too (which is also common). WIthin your
user control you subcribe to events from the text boxes, and then in
the event handler you raise an event particular to the user control.
For example:

this.userContro l.ApplicationIn formationChange d += new
System.EventHan dler(...);

and then inside your user control:

this.txtLastNam e.TextChanged += new
System.EventHan dler(this.txtLa stName_TextChan ged);
.... etc ...
private void txtLastName_Tex tChanged(System .EventArgs ea)
{
OnApplicationIn formationChange d();
}
.... etc ...
protected void OnApplicationIn formationChange d()
{
if (ApplicationInf ormationChanged != null)
{
ApplicationInfo rmationChanged( System.EventArg s.Empty);
}
}

Again, this isolates your caller from knowing about the controls within
your user control, and creates events that are meaningful at the level
of the user control rather than events that depend upon how the user
control is constructed.

Was this post helpful to you?

Why should I rate a post?


Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
© 2005 Microsoft Corporation. All rights reserved. Terms of Use |Trademarks
|Privacy Statement

Nov 19 '05 #1
4 2501
I might have shamelessly plugged this in the original, but take a look at:
http://openmymind.net/index.aspx?documentId=9

basically you would cast the Control returned by FindControl to the specific
control type..

MyUserControl c = (MyUserControl) Page.FindContro l("someId")

int x = c.MyProperty;

of course, if the control is placed on the page, why do you need to do a
FindControl? it should be a member like a textbox or any other control...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:73******** *************** ***********@mic rosoft.com...
Resending this as own topic as didnt get answer from original. Would be
grateful for a response from anyone that knows. Thanks.

Hi there, I found your post really helpful..but i wondered if, once I have
exposed a public property containing the value of a textbox in a user
control..how do I grab this from the calling page? I cant think of the
syntax, since my page doesnt know the contents of the class (and
therefore,
the public properties) of the user control??

Sorry if its blatently obvious!

I am currently getting a value using
Page.FindContro l(usercontrol); usercontrol.Fin dControl...etc etc and am
told
this is much slower than the public property route.

Many Thanks, Louise.

"Bruce Wood" wrote:
You should avoid exposing controls within your user control as public
members. I almost wrote "You should never expose..." but I'm not
feeling that cocky.

The way to handle this problem (and it's a common one), is to think
about the user control as a whole. Obviously, it has 30 text boxes for
a reason. What is the sum functionality of the entire user control? Is
it, for example, an application form?

Assuming that it's an application form (for the sake of argument), then
you don't _really_ want to be able to get at the text boxes. What you
_really_ want is to get at the information on the form. So, you could
do that by exposing one public property for each item on the form:

public string LastName
{
get { return this.txtLastNam e.Text; }
set { this.txtLastNam e.Text = value; }
}

Or, you could create a class that would hold all of the application
information, and expose a single property:

public ApplicationInfo rmation ApplicationInfo rmation
{
get { return new ApplicationInfo rmation(this.tx tLastName.Text, ...
); }
set
{
this.txtLastNam e.Text = value.LastName;
...
}
}

Either way, what you've done is expose properties that "talk in the
language of" your user control as a whole. This does two very good
things: 1) it makes the calling code more readable, because callers can
now write code in terms of what the user control does, not in terms of
how it's put together, and 2) it makes the calling code ignorant of the
structure of your user control (loose coupling), so that you can
change, for example, a radio button group to a combo box if that makes
more sense from an interface point of view... all without changing any
calling code. The less your calling code knows about the guts of your
user control, the better.

You can do this with events, too (which is also common). WIthin your
user control you subcribe to events from the text boxes, and then in
the event handler you raise an event particular to the user control.
For example:

this.userContro l.ApplicationIn formationChange d += new
System.EventHan dler(...);

and then inside your user control:

this.txtLastNam e.TextChanged += new
System.EventHan dler(this.txtLa stName_TextChan ged);
.... etc ...
private void txtLastName_Tex tChanged(System .EventArgs ea)
{
OnApplicationIn formationChange d();
}
.... etc ...
protected void OnApplicationIn formationChange d()
{
if (ApplicationInf ormationChanged != null)
{
ApplicationInfo rmationChanged( System.EventArg s.Empty);
}
}

Again, this isolates your caller from knowing about the controls within
your user control, and creates events that are meaningful at the level
of the user control rather than events that depend upon how the user
control is constructed.

Was this post helpful to you?

Why should I rate a post?


Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
© 2005 Microsoft Corporation. All rights reserved. Terms of Use
|Trademarks
|Privacy Statement

Nov 19 '05 #2
Thanks Karl. I know what you are saying but am still confused - the
properties of a control such as a TextBox return standard properties for the
object such as ID, public properties that i set up myself. If I do this:

protected UserControl DirectNav1; (DirectNav1 being the name i have given it
in the aspx page)

protected void Page_Load(Objec t sender, System.EventArg s e)
{
intSID = DirectNav1.intS tatusID;
}

it says intStatusID isnt a property of UserControl. I do not understand how
my page will know the contents of the class of my user control.??? what part
of this process am I not understanding?

"Karl Seguin" wrote:
I might have shamelessly plugged this in the original, but take a look at:
http://openmymind.net/index.aspx?documentId=9

basically you would cast the Control returned by FindControl to the specific
control type..

MyUserControl c = (MyUserControl) Page.FindContro l("someId")

int x = c.MyProperty;

of course, if the control is placed on the page, why do you need to do a
FindControl? it should be a member like a textbox or any other control...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:73******** *************** ***********@mic rosoft.com...
Resending this as own topic as didnt get answer from original. Would be
grateful for a response from anyone that knows. Thanks.

Hi there, I found your post really helpful..but i wondered if, once I have
exposed a public property containing the value of a textbox in a user
control..how do I grab this from the calling page? I cant think of the
syntax, since my page doesnt know the contents of the class (and
therefore,
the public properties) of the user control??

Sorry if its blatently obvious!

I am currently getting a value using
Page.FindContro l(usercontrol); usercontrol.Fin dControl...etc etc and am
told
this is much slower than the public property route.

Many Thanks, Louise.

"Bruce Wood" wrote:
You should avoid exposing controls within your user control as public
members. I almost wrote "You should never expose..." but I'm not
feeling that cocky.

The way to handle this problem (and it's a common one), is to think
about the user control as a whole. Obviously, it has 30 text boxes for
a reason. What is the sum functionality of the entire user control? Is
it, for example, an application form?

Assuming that it's an application form (for the sake of argument), then
you don't _really_ want to be able to get at the text boxes. What you
_really_ want is to get at the information on the form. So, you could
do that by exposing one public property for each item on the form:

public string LastName
{
get { return this.txtLastNam e.Text; }
set { this.txtLastNam e.Text = value; }
}

Or, you could create a class that would hold all of the application
information, and expose a single property:

public ApplicationInfo rmation ApplicationInfo rmation
{
get { return new ApplicationInfo rmation(this.tx tLastName.Text, ...
); }
set
{
this.txtLastNam e.Text = value.LastName;
...
}
}

Either way, what you've done is expose properties that "talk in the
language of" your user control as a whole. This does two very good
things: 1) it makes the calling code more readable, because callers can
now write code in terms of what the user control does, not in terms of
how it's put together, and 2) it makes the calling code ignorant of the
structure of your user control (loose coupling), so that you can
change, for example, a radio button group to a combo box if that makes
more sense from an interface point of view... all without changing any
calling code. The less your calling code knows about the guts of your
user control, the better.

You can do this with events, too (which is also common). WIthin your
user control you subcribe to events from the text boxes, and then in
the event handler you raise an event particular to the user control.
For example:

this.userContro l.ApplicationIn formationChange d += new
System.EventHan dler(...);

and then inside your user control:

this.txtLastNam e.TextChanged += new
System.EventHan dler(this.txtLa stName_TextChan ged);
.... etc ...
private void txtLastName_Tex tChanged(System .EventArgs ea)
{
OnApplicationIn formationChange d();
}
.... etc ...
protected void OnApplicationIn formationChange d()
{
if (ApplicationInf ormationChanged != null)
{
ApplicationInfo rmationChanged( System.EventArg s.Empty);
}
}

Again, this isolates your caller from knowing about the controls within
your user control, and creates events that are meaningful at the level
of the user control rather than events that depend upon how the user
control is constructed.

Was this post helpful to you?

Why should I rate a post?


Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
© 2005 Microsoft Corporation. All rights reserved. Terms of Use
|Trademarks
|Privacy Statement


Nov 19 '05 #3
Louise:
You are saying that DirectNav1 is of type UserControl in your decleration
(protected USERCONTROL DirectNav1)

In reality, DirectNav1 is something more specific, not sure what you called
it, but maybe DirectNav...if you open the user control's codebehind, you'll
see something like

public class DirectNav : UserControl{
public int intStatusId{get { ... } set { ... } }
...
}

UserControl doesn't have a property named intStatusId, but DirectNav does,
so if you change your declaration to be:

protected DirectNav DirectNav1;

then all should be good.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:70******** *************** ***********@mic rosoft.com...
Thanks Karl. I know what you are saying but am still confused - the
properties of a control such as a TextBox return standard properties for
the
object such as ID, public properties that i set up myself. If I do this:

protected UserControl DirectNav1; (DirectNav1 being the name i have given
it
in the aspx page)

protected void Page_Load(Objec t sender, System.EventArg s e)
{
intSID = DirectNav1.intS tatusID;
}

it says intStatusID isnt a property of UserControl. I do not understand
how
my page will know the contents of the class of my user control.??? what
part
of this process am I not understanding?

"Karl Seguin" wrote:
I might have shamelessly plugged this in the original, but take a look
at:
http://openmymind.net/index.aspx?documentId=9

basically you would cast the Control returned by FindControl to the
specific
control type..

MyUserControl c = (MyUserControl) Page.FindContro l("someId")

int x = c.MyProperty;

of course, if the control is placed on the page, why do you need to do a
FindControl? it should be a member like a textbox or any other
control...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:73******** *************** ***********@mic rosoft.com...
> Resending this as own topic as didnt get answer from original. Would be
> grateful for a response from anyone that knows. Thanks.
>
> Hi there, I found your post really helpful..but i wondered if, once I
> have
> exposed a public property containing the value of a textbox in a user
> control..how do I grab this from the calling page? I cant think of the
> syntax, since my page doesnt know the contents of the class (and
> therefore,
> the public properties) of the user control??
>
> Sorry if its blatently obvious!
>
> I am currently getting a value using
> Page.FindContro l(usercontrol); usercontrol.Fin dControl...etc etc and am
> told
> this is much slower than the public property route.
>
> Many Thanks, Louise.
>
> "Bruce Wood" wrote:
>
>> You should avoid exposing controls within your user control as public
>> members. I almost wrote "You should never expose..." but I'm not
>> feeling that cocky.
>>
>> The way to handle this problem (and it's a common one), is to think
>> about the user control as a whole. Obviously, it has 30 text boxes for
>> a reason. What is the sum functionality of the entire user control? Is
>> it, for example, an application form?
>>
>> Assuming that it's an application form (for the sake of argument),
>> then
>> you don't _really_ want to be able to get at the text boxes. What you
>> _really_ want is to get at the information on the form. So, you could
>> do that by exposing one public property for each item on the form:
>>
>> public string LastName
>> {
>> get { return this.txtLastNam e.Text; }
>> set { this.txtLastNam e.Text = value; }
>> }
>>
>> Or, you could create a class that would hold all of the application
>> information, and expose a single property:
>>
>> public ApplicationInfo rmation ApplicationInfo rmation
>> {
>> get { return new ApplicationInfo rmation(this.tx tLastName.Text, ...
>> ); }
>> set
>> {
>> this.txtLastNam e.Text = value.LastName;
>> ...
>> }
>> }
>>
>> Either way, what you've done is expose properties that "talk in the
>> language of" your user control as a whole. This does two very good
>> things: 1) it makes the calling code more readable, because callers
>> can
>> now write code in terms of what the user control does, not in terms of
>> how it's put together, and 2) it makes the calling code ignorant of
>> the
>> structure of your user control (loose coupling), so that you can
>> change, for example, a radio button group to a combo box if that makes
>> more sense from an interface point of view... all without changing any
>> calling code. The less your calling code knows about the guts of your
>> user control, the better.
>>
>> You can do this with events, too (which is also common). WIthin your
>> user control you subcribe to events from the text boxes, and then in
>> the event handler you raise an event particular to the user control.
>> For example:
>>
>> this.userContro l.ApplicationIn formationChange d += new
>> System.EventHan dler(...);
>>
>> and then inside your user control:
>>
>> this.txtLastNam e.TextChanged += new
>> System.EventHan dler(this.txtLa stName_TextChan ged);
>> .... etc ...
>> private void txtLastName_Tex tChanged(System .EventArgs ea)
>> {
>> OnApplicationIn formationChange d();
>> }
>> .... etc ...
>> protected void OnApplicationIn formationChange d()
>> {
>> if (ApplicationInf ormationChanged != null)
>> {
>> ApplicationInfo rmationChanged( System.EventArg s.Empty);
>> }
>> }
>>
>> Again, this isolates your caller from knowing about the controls
>> within
>> your user control, and creates events that are meaningful at the level
>> of the user control rather than events that depend upon how the user
>> control is constructed.
>>
>>
> Was this post helpful to you?
>
> Why should I rate a post?
>
>
>
>
>
>
> Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
> © 2005 Microsoft Corporation. All rights reserved. Terms of Use
> |Trademarks
> |Privacy Statement
>


Nov 19 '05 #4
It was staring me in the face! Its not until someone points it out and it all
becomes clear! Thanks much appreciated :o)

"Karl Seguin" wrote:
Louise:
You are saying that DirectNav1 is of type UserControl in your decleration
(protected USERCONTROL DirectNav1)

In reality, DirectNav1 is something more specific, not sure what you called
it, but maybe DirectNav...if you open the user control's codebehind, you'll
see something like

public class DirectNav : UserControl{
public int intStatusId{get { ... } set { ... } }
...
}

UserControl doesn't have a property named intStatusId, but DirectNav does,
so if you change your declaration to be:

protected DirectNav DirectNav1;

then all should be good.

Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:70******** *************** ***********@mic rosoft.com...
Thanks Karl. I know what you are saying but am still confused - the
properties of a control such as a TextBox return standard properties for
the
object such as ID, public properties that i set up myself. If I do this:

protected UserControl DirectNav1; (DirectNav1 being the name i have given
it
in the aspx page)

protected void Page_Load(Objec t sender, System.EventArg s e)
{
intSID = DirectNav1.intS tatusID;
}

it says intStatusID isnt a property of UserControl. I do not understand
how
my page will know the contents of the class of my user control.??? what
part
of this process am I not understanding?

"Karl Seguin" wrote:
I might have shamelessly plugged this in the original, but take a look
at:
http://openmymind.net/index.aspx?documentId=9

basically you would cast the Control returned by FindControl to the
specific
control type..

MyUserControl c = (MyUserControl) Page.FindContro l("someId")

int x = c.MyProperty;

of course, if the control is placed on the page, why do you need to do a
FindControl? it should be a member like a textbox or any other
control...

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/ - New and Improved (yes, the popup is
annoying)
http://www.openmymind.net/faq.aspx - unofficial newsgroup FAQ (more to
come!)
"louise raisbeck" <lo************ @discussions.mi crosoft.com> wrote in
message news:73******** *************** ***********@mic rosoft.com...
> Resending this as own topic as didnt get answer from original. Would be
> grateful for a response from anyone that knows. Thanks.
>
> Hi there, I found your post really helpful..but i wondered if, once I
> have
> exposed a public property containing the value of a textbox in a user
> control..how do I grab this from the calling page? I cant think of the
> syntax, since my page doesnt know the contents of the class (and
> therefore,
> the public properties) of the user control??
>
> Sorry if its blatently obvious!
>
> I am currently getting a value using
> Page.FindContro l(usercontrol); usercontrol.Fin dControl...etc etc and am
> told
> this is much slower than the public property route.
>
> Many Thanks, Louise.
>
> "Bruce Wood" wrote:
>
>> You should avoid exposing controls within your user control as public
>> members. I almost wrote "You should never expose..." but I'm not
>> feeling that cocky.
>>
>> The way to handle this problem (and it's a common one), is to think
>> about the user control as a whole. Obviously, it has 30 text boxes for
>> a reason. What is the sum functionality of the entire user control? Is
>> it, for example, an application form?
>>
>> Assuming that it's an application form (for the sake of argument),
>> then
>> you don't _really_ want to be able to get at the text boxes. What you
>> _really_ want is to get at the information on the form. So, you could
>> do that by exposing one public property for each item on the form:
>>
>> public string LastName
>> {
>> get { return this.txtLastNam e.Text; }
>> set { this.txtLastNam e.Text = value; }
>> }
>>
>> Or, you could create a class that would hold all of the application
>> information, and expose a single property:
>>
>> public ApplicationInfo rmation ApplicationInfo rmation
>> {
>> get { return new ApplicationInfo rmation(this.tx tLastName.Text, ...
>> ); }
>> set
>> {
>> this.txtLastNam e.Text = value.LastName;
>> ...
>> }
>> }
>>
>> Either way, what you've done is expose properties that "talk in the
>> language of" your user control as a whole. This does two very good
>> things: 1) it makes the calling code more readable, because callers
>> can
>> now write code in terms of what the user control does, not in terms of
>> how it's put together, and 2) it makes the calling code ignorant of
>> the
>> structure of your user control (loose coupling), so that you can
>> change, for example, a radio button group to a combo box if that makes
>> more sense from an interface point of view... all without changing any
>> calling code. The less your calling code knows about the guts of your
>> user control, the better.
>>
>> You can do this with events, too (which is also common). WIthin your
>> user control you subcribe to events from the text boxes, and then in
>> the event handler you raise an event particular to the user control.
>> For example:
>>
>> this.userContro l.ApplicationIn formationChange d += new
>> System.EventHan dler(...);
>>
>> and then inside your user control:
>>
>> this.txtLastNam e.TextChanged += new
>> System.EventHan dler(this.txtLa stName_TextChan ged);
>> .... etc ...
>> private void txtLastName_Tex tChanged(System .EventArgs ea)
>> {
>> OnApplicationIn formationChange d();
>> }
>> .... etc ...
>> protected void OnApplicationIn formationChange d()
>> {
>> if (ApplicationInf ormationChanged != null)
>> {
>> ApplicationInfo rmationChanged( System.EventArg s.Empty);
>> }
>> }
>>
>> Again, this isolates your caller from knowing about the controls
>> within
>> your user control, and creates events that are meaningful at the level
>> of the user control rather than events that depend upon how the user
>> control is constructed.
>>
>>
> Was this post helpful to you?
>
> Why should I rate a post?
>
>
>
>
>
>
> Manage Your Profile |Legal |Contact Us |MSDN Flash Newsletter
> © 2005 Microsoft Corporation. All rights reserved. Terms of Use
> |Trademarks
> |Privacy Statement
>


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1456
by: Scott Collens | last post by:
Hi there, does anyone know if it is possible to set a value in a user control and pick it up in the code behind. I'm trying to reuse the same user control and code behind for multiple pages but I don't want to use a querystring param. Thanks for listening...Scott
7
2416
by: Gene | last post by:
I have a number of aspx pages on which a single user control appears. All of the aspx pages and the user control make user of code-behind modules. I need for logic in the user control's code-behind to read the current value of a variable in the hosting aspx page's code-behind. How is this accomplished? Thanks.
9
2115
by: nail | last post by:
Hi. So I have a default.aspx page and 3 WebUserControls In the WebUserControl1, I have on TexBox, and in the default.aspx page I have a Button control. On the click event of the default.aspx page I need to change the TextBox.Text value, but not user the FindControl Method because I think this methos very slow. So, I want this, but not with findcontrol:
2
2625
by: Darrel | last post by:
I have a usercontrol that sets some public variables. I can grab this variable from another usercontrol like this: ctype(Page, templatePage).UC_getVariables.globalMenuCategory This works fine because the control setting the variable is processed before the control reading the variable. The catch is that I now want to read this variable from the parent page. The
5
5947
by: Nathan Sokalski | last post by:
I have a user control that contains three variables which are accessed through public properties. They are declared immediately below the "Web Form Designer Generated Code" section. Every time an event is fired by one of the controls contained in the User Control, these variable are reset. Here is my current code (I have a little more to add later, right now I am just concerned about the variables getting reset): Public Class DatePicker2...
10
2241
by: Blaxer | last post by:
There is probably a really easy way to do this, so please forgive me but I would like to set the value of a variable from a variable, an example would be... function Calculate_Something(ByVal multiplyer as integer, ByVal variable as ___?) variable = 5 * multiplyer end function What I would like this function to do is take the name of the incoming variable and assign a calculated value to it. Any help would be greatly appreciated, TIA!!
13
2486
by: Deano | last post by:
Apparently you can only do this with one value i.e Call MyAssetLocationZoom(Me!txtLocation, "Amend data") This runs; Public Sub MyAssetLocationZoom(ctl As Control, formName As String) On Error GoTo err_zoom strFormName = formName
6
1514
by: David Hearn | last post by:
I have a property in a user control that I am setting: Private strPageName as String Public Property PageName() as String Get Return strPageName End Get Set(byVal Value as String) strPageName = Value End Set
7
16263
by: pooba53 | last post by:
I am working with VB .NET 2003. Let's say my main form is called Form1. I have to launch a new form (Form2) that gathers input from the user. How can I pass variable information back to Form1 before calling the Me.close() on Form2? -Stumped
0
7938
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8427
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8078
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8298
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6752
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectóplanning, coding, testing, and deploymentówithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5452
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3914
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3962
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1548
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.