473,698 Members | 2,361 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Access Controls within a FormView (.Net 2.0 & VB.Net)

1 New Member
Hi, I am using a server controls (textbox, dropdownlist, calendar) inside of a form view, it seems that the .Net framework (VB.Net & Net Frame Work 2.0) makes it difficult to access the control properties when embedded inside of a FormView control.

What I am trying to do is to enable or disable a textbox control programatically by accessing the property of the control, along the lines of:

textbox1.Enable = false

However, when the textbox control is embedded in a Formview nested in the EditItemTemplat e then the textbox is Not accessible. I would think that the following syntax should work, but it does not:

FormView1.EditI temTemplate.Tex tbox1.Enable = false


Could anyone suggest the proper syntax for me to Get/Set the properties of controls embedded inside of a formview while using VB.Net & .Net Frame Work 2.0?

-r
Aug 21 '07 #1
0 1688

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3545
by: Paul Maidment | last post by:
Hi, I am a bit green when it comes to .net development so please excuse me if this question is obvious or has been asked before... I am trying to programmatically access a label control within a datalist footer template using asp/vb.net. I have been searching through the documentation but can only find reference to
3
1294
by: Brent Minder | last post by:
What is the most efficient way to code asp.net pages when you break your page up into user controls? For example: If you have a page with a header (control .ascx), body, and footer (control .ascx) for a given page and you need to access functions within a class (bizUtil say) should you declare the bizUtil object on the header and footer in both the aspx and aspx.vb pages? That's FOUR references! This seems bloatful (my new word).
1
980
by: DavidTurcotte | last post by:
Hi I have 10 lablels contain within a asp:repeater. My problem is that that the aspRepeater.Controls return Nothing all the time. i can not access its control collection. The count is 0. The hasCollection return false.
3
6040
by: sck10 | last post by:
Hello, I am creating a form for users to enter information about a lab and the members of the lab. I have one form (FormView) that they use to enter information about that lab. The keyvalue is "LabLocation_ID". With an existing lab, they then need to add the members for that lab. So, what I am trying to do is the following. With the FormView of the Lab open, the user will click a button to open a FormView (InsertMode) and add a new...
2
8636
by: wikkiwikkiwaa | last post by:
hello, i am trying to access controls inside my formview1 nested inside loginview1. you cannot access the formview1 unless you are properly logged in. for loginview1, that seems to be fairly simple. a label control would be: Label label1 = (Label)loginview1.FindControl("nameoflabel"); then i get to the data that was bound to that control.
4
6258
by: ~john | last post by:
If I have a label on the Master Page that I would like to change its text with a button on one of the content pages, Default.aspx... It's giving me an error saying "Label1" is not found. Can you only find controls on the current page.. ie Default.aspx.cs can only access controls on the Default.aspx page? ~john
1
1723
by: Q. John Chen | last post by:
I have Validation controls on FormView. ClientScripts is enabled FormView's DefaultMode is ReadOnly. And I have button so it will swith to Insert or Edit mode. To be specific, I have a RequiredFieldValidator to validate a dropDownList and a RegEx validator to validate a text box. The client script is enable but it does nothing and PostBack happens
1
4577
by: googlegroup | last post by:
I have master pages , with MyAccordion and 2 panes. I can veiw the controls within MyAccordion on pageLoad Output of controls: MyAccordion_AccordionExtender AccordionPane1 AccordionPane2
2
2648
by: AC [MVP MOSS] | last post by:
I have a repeater with a header, footer, and item template. The item template is the only one with server controls (hyperlinks, labels, and a nested repeater). Within the top repeater, I'm handling the ItemDataBound method in the code behind. In this handler, I need to get access to the controls within the ItemTemplate.... however I've only found one way to do this (and i"m not sure why it works). Once I cast the sender (first param...
0
8603
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
9157
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9027
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
8895
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
8861
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
7725
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...
1
6518
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
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();...
2
2329
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.