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

Getting Form id in code behind

Hi All

I have a asp.net User control which has sime client side
client scripting written in it at runtime.

Now my problem is, for this client script to woek properly
I need a Container form Id (i.e. <Form></Form> tag Id) so
that I can use syntax like document.formID.ControlId.value.

Can anybody tell me how to get the Form Id is code behind
at server side during runtime?

Thanx

Makarand
Nov 17 '05 #1
1 1002
"Makarand" <an*******@discussions.microsoft.com> wrote in message
news:05****************************@phx.gbl...
Hi All

I have a asp.net User control which has sime client side
client scripting written in it at runtime.

Now my problem is, for this client script to woek properly
I need a Container form Id (i.e. <Form></Form> tag Id) so
that I can use syntax like document.formID.ControlId.value.

Can anybody tell me how to get the Form Id is code behind
at server side during runtime?


I believe you're going to have to search recursively in the Controls
collection of the page until you find the form, and then use
<form>.ClientID.
--
John
Nov 17 '05 #2

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

Similar topics

3
by: RC | last post by:
I can't quite grasp the concept of creating custom reports depending upon what options a user picks on a Form. For example, the user clicks on a "Print Reports" button and a Form pops up. On the...
8
by: Susan Bricker | last post by:
Hi. I am opening a form (frmUserSettings) just before (or so I thought) the Main Menu form (frmMainMenu) is opening but it's not getting the focus. It gets "painted" and then the Main Menu gets...
5
by: Adam Clauss | last post by:
I have a webapp which consists of several different webforms. Basically: (1) view the contents of a database (2) one is to add a new entry (3) confirms the new entry. The third form, upon...
7
by: gemel | last post by:
I am developing an application that uses SQL 2000 as my source of images. I have successfully created the code to load the images onto the SQL Server and also to retrieve the images into a dataset....
1
by: Paul D. Fox | last post by:
I'm trying to launch a Child Window from a hyperlink on a Datagrid and have it recieve multiple values from the Parent Window. Upon recieving the values in the Child Window, I need to access them...
2
by: kvicky | last post by:
can anybody tell how to get a form show up in Code behind in C#. If I type something I want a form to show up so that I can enter some values and use those values in my code. Can I do this...
2
by: Tina | last post by:
I'm trying to get started with Atlas and associated necessary javascript at the same time. I started out at http://atlas.asp.net/walkthroughs/gettingstarted/basic.net where they have an...
16
by: Steve | last post by:
I am working on a database that has a main menu, many sub-menus and some sub-sub-menus. They are all forms that have numerous command buttons on them to open forms and reports in the database. The...
12
by: Richard Penfold | last post by:
I am developing an order tracking database, which to keep this explanation simple, consists of 'Orders' table, 'Order Details' table, 'Deliveries' table & 'Inventory' table. There are one-to-many...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
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...
0
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...
0
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,...

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.