473,382 Members | 1,424 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,382 software developers and data experts.

Detecting the form name

I am trying to build a user control that will allow a user
to select a date from a calendar. I have to code that will
run on the calendar's SelectionChanged event, but i am at
a loss to return the data to the correct text box.

The question is...How do I detect the Form Name
programatically from a user control that is included on a
page. i.e. - me.formname....?

Thanks in advance for any help.

Michael Albanese

Jul 19 '05 #1
4 2166
Why not just pass a instance of the textbox to the control?

"Michael Albanese" <ma*******@ci.stamford.ct.us> wrote in message
news:06****************************@phx.gbl...
I am trying to build a user control that will allow a user
to select a date from a calendar. I have to code that will
run on the calendar's SelectionChanged event, but i am at
a loss to return the data to the correct text box.

The question is...How do I detect the Form Name
programatically from a user control that is included on a
page. i.e. - me.formname....?

Thanks in advance for any help.

Michael Albanese

Jul 19 '05 #2
Hi Michael,

Bryan is right.

You can check this link. I think it should be helpful.
http://aspnet.4guysfromrolla.com/articles/030202-1.aspx

Best Regards,
Lewis

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Michael Albanese" <ma*******@ci.stamford.ct.us>
| Sender: "Michael Albanese" <ma*******@ci.stamford.ct.us>
| Subject: Detecting the form name
| Date: Mon, 4 Aug 2003 05:55:43 -0700
| Lines: 13
| Message-ID: <06****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNah7bvBWljnXTaTKK+VrB41V0Zcg==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:103351
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| I am trying to build a user control that will allow a user
| to select a date from a calendar. I have to code that will
| run on the calendar's SelectionChanged event, but i am at
| a loss to return the data to the correct text box.
|
| The question is...How do I detect the Form Name
| programatically from a user control that is included on a
| page. i.e. - me.formname....?
|
| Thanks in advance for any help.
|
| Michael Albanese
|
|

Jul 19 '05 #3
Hi Michael,

If the user control and the textbox are on the same page, then in the code
behind of the user control:

private void Button1_Click(object sender, System.EventArgs e)
{
TextBox t=(TextBox)this.Parent.FindControl("pageTextBox");
t.Text ="......" ;
}

Does this answer your question? Please let me know if you need more
information

Best Regards,
Lewis

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| Content-Class: urn:content-classes:message
| From: "Michael Albanese" <ma*******@ci.stamford.ct.us>
| Sender: "Michael Albanese" <ma*******@ci.stamford.ct.us>
| Subject: Detecting the form name
| Date: Mon, 4 Aug 2003 05:55:43 -0700
| Lines: 13
| Message-ID: <06****************************@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcNah7bvBWljnXTaTKK+VrB41V0Zcg==
| Newsgroups: microsoft.public.dotnet.general
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:103351
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| I am trying to build a user control that will allow a user
| to select a date from a calendar. I have to code that will
| run on the calendar's SelectionChanged event, but i am at
| a loss to return the data to the correct text box.
|
| The question is...How do I detect the Form Name
| programatically from a user control that is included on a
| page. i.e. - me.formname....?
|
| Thanks in advance for any help.
|
| Michael Albanese
|
|

Jul 19 '05 #4
Hi Michael ,

You are welcome. Thanks for participating in community.

Regards,
Lewis

--------------------
| From: Michael Albanese <ma*******@ci.stamford.ct.us>
| References: <aS**************@cpmsftngxa06.phx.gbl>
| X-Newsreader: AspNNTP 1.50 (ActionJackson.com)
| Subject: RE: Detecting the form name
| Mime-Version: 1.0
| Content-Type: text/plain; charset="us-ascii"
| Content-Transfer-Encoding: 7bit
| Message-ID: <eC**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.general
| Date: Tue, 05 Aug 2003 04:13:45 -0700
| NNTP-Posting-Host: actionjackson133.dsl.frii.net 216.17.147.133
| Lines: 1
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.general:103505
| X-Tomcat-NG: microsoft.public.dotnet.general
|
| Thanks for all of the input.
|
| Both the article and the code post were very helpful.
|
| I was able to build my controland move the project forward.
|
| Thanks again,
|
| Michael Albanese
|
|
|
|
| *** Sent via Developersdex http://www.developersdex.com ***
| Don't just participate in USENET...get rewarded for it!
|

Jul 19 '05 #5

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

Similar topics

2
by: Halldór Ísak Gylfason | last post by:
In my application I have an iframe that is empty (and not visible) initially, however when a user presses a button a form is programmatically submitted and the target is set to the IFrame. I...
9
by: Fabian | last post by:
Is there a way to detect which object currently has the focus in javascript? "this" comes close, but isnt implemented in netscape. -- -- Fabian Visit my website often and for long periods!...
3
by: Csaba Gabor | last post by:
If I detect an empty textbox, I fill it with a value ('Dad'). If I do this twice, the second time around IE 6 fails to notice that I've cleared the textbox again, thus leaving the textbox cleared....
3
by: raptor | last post by:
hi, how to detect opera..it seems that even opera8 doesnt support xmlhttp fully (.i.e. sendRequestHeader). I ask this 'cause opera seems to mimic IE, at least in the preferences ?! I havent...
27
by: Deek | last post by:
I have a target(graphic) that moves via, i am trying to detect a hit of the target with and essay(copied below) my prof gave us, but I am not sure what to do, if you could get me going in the...
4
by: jcrouse | last post by:
I am using the following code to move a label on a form at runtime: If myMousedown = lblP1JoyRight.Name Then If lblP1JoyRight.BackColor.Equals(Color.Transparent) Then bTransCk = True ...
4
by: Michael Albanese | last post by:
I am trying to build a user control that will allow a user to select a date from a calendar. I have to code that will run on the calendar's SelectionChanged event, but i am at a loss to return the...
1
by: wwwords | last post by:
Is there a general method for detecting that a user has changed the record currently visible on a form, whether this is by hitting PgUp or PgDn or clicking on a navigation button, even if no change...
1
omerbutt
by: omerbutt | last post by:
HI I am WORKING ON A PROJECT IN WHICH I HAVE TO CREATE SOME INPUT FIELDS by selecting the number of inputs from a select menu the problem is that when i post the form the fields inside the div are...
1
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.