CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 12/17/2006 1:34:35 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 17 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
Doods
Asp.Net User
Getting a Page Control property from Custom Code12/17/2006 1:34:35 PM

0/0

Greetings all,

I have several controls (add/delete/submit buttons, gridview to name a few) in my default.aspx page.  What I want is to be able to get the properties of these controls from a custom class in my BLL folder, and eventually change their properties accordingly.

Could someone show me how I can do that?

Thanks.

Doods
Asp.Net User
Re: Getting a Page Control property from Custom Code12/18/2006 7:35:11 AM

0/0

Sorry if I have to ask again, but I really need help on how (if possible) I can access and change a web page's web control (button, grid, etc) property from a custom class. 

Please if you know how to do this or can point me to a link to resolve my problem I would appreciate it big time.

Geeked

 

 

Doods
Asp.Net User
Re: Getting a Page Control property from Custom Code12/18/2006 1:45:07 PM

0/0

Okay - no takers so allow me to post what I have discovered so far.

I can access the controls in my aspx page using my Master Page, and the FindControl method.

To be able to do this, I can write code on the Page Load of the master page.

Create an instance of the Master Page's ContentPlaceHolder control.

Dim placeholder as ContentPlaceHolder
placeholder = Page.Master.FindControl("ContentPlaceHolder1")            'the value of the FindControl may change depending on the ID of your master page's contentplaceholder

Then, I should create an instance of the control i am looking for, say a Label control

Dim myLabel as Label
myLabel = placeholder.FindControl("lblNewPage")

Once found, I can make changes to the property of the control:

If Not myLabel Is Nothing Then
    myLabel.Style.Add("font-size", "20px")
End If


Regards,

Iori_Jay
Asp.Net User
Re: Getting a Page Control property from Custom Code12/19/2006 3:31:24 AM

0/0

Hi Doods, you're on the right way. Any other issue?
Welcome to my SQL/ASPNET forum for Chinese
http://51up.org/bbs/forumdisplay.php?fid=38
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Mastering Web Development with Microsoft Visual Studio 2005 Authors: John Paul Mueller, Pages: 822, Published: 2005
Pro ASP. Net 3. 5 Server Controls and AJAX Components Authors: Rob Cameron, Dale Michalk, Pages: 740, Published: 2008
Professional ASP.NET 2.0 Server Control and Component Development Authors: Shahram Khosravi, Pages: 1186, Published: 2006
ASP.NET 2.0 All-In-One Desk Reference For Dummies: all-in-one desk reference for dummies Authors: Doug Lowe, Jeff Cogswell, Ken Cox, Pages: 910, Published: 2006
Professional ASP.NET 2.0 Databases Authors: Thiru Thangarathinam, Pages: 504, Published: 2007
Professional Web Parts and Custom Controls with ASP.NET 2.0 Authors: Peter Vogel, Pages: 449, Published: 2005
Beginning ASP.NET 2.0 with C# Authors: Chris Hart, John Kauffman, David Sussman, Chris Ullman, Pages: 735, Published: 2006
Using Microsoft Outlook 2000 Authors: Gordon Padwick, Helen Feddema, Pages: 1488, Published: 1999
Visual Basic 6 Secrets Authors: Harold Davis, Pages: 890, Published: 1998
ASP.NET AJAX Programmer's Reference: With ASP.NET 2.0 Or ASP.NET 3.5 Authors: Shahram Khosravi, Pages: 1522, Published: 2007

Web:
Getting a Page Control property from Custom Code - ASP.NET Forums Getting a Page Control property from Custom Code. Last post 12-18-2006 10:31 PM by Iori_Jay. 3 replies. Sort Posts: ...
MSDN Windows Presentation Foundation (WPF) Custom Code Editor ... Custom Code Editor Control in WPF. ... Unfortunately the page the download link of this AEdit control refers to seems to be down. ...
ControlBuilderFAQ - Show FAQ - Custom parameters for data sources Getting value from Page's ViewState by Fabio (Posted on 5/15/2006 1:05:00 PM) ... Custom Parameter for User Control Property by Travis ...
TheMSsForum.com >> Dotnet >> Custom code generation like Timer ... The property grid control displays the database field properties in the ... I am frequently getting messages like "This page contain both secure and non ...
CodeProject: Embed PDFs into a Web Page with a Custom Control ... The page contains only a panel used as a banner, a hyperlink pointing directly to a PDF file, and the custom control with its file path property also ...
GetAFreelancer.com - C# Custom Server Control : Programatically ... Jan 19, 2008 ... C# Custom Server Control : Programatically Hiding/Disabling A Property from the VS DesignTime Property Editor and Intellisence ...
Getting custom properties on a user control Reload this Page Getting custom properties on a user control ... The " CurrentStep=2" is supposed to be a "custom property" and I would ...
Syntax for Outlook property and form control values and events An important related topic covered on this page is how to write code to handle ... Visible) or putting data into or getting data out of an unbound control. ...
Using custom code in building blocks — Axisbase Feb 14, 2007 ... This page describes how to plug custom code into building blocks that are .... When you have a situation where you need custom control over ...
Setting a Custom Control Property that is an enumeration (or other ... I have a property set in my templated custom control as follows ... In my Page Code, I would like to set the property to the color I want, ...

Videos:
XML11: An Abstract Windowing Protocol Google TechTalks June 1, 2006 Arno Puder Arno Puder received his masters and Ph.D. in computer science and is currently working as an Assistant Prof...
Santa Monica Council Meeting Santa Monica Council Meeting
Long Beach City Council Meeting Long Beach City Council Meeting
Using ROSE to Mitigate Performance Trade-offs Google TechTalks April 03, 2006 Daniel Quinlan ROSE is a tool for building source-to-source transformation tools for the optimization of C and C++ ...




Search This Site:










obtain reference to a usercontrol added to web form at design time

customising the login control to authenticate against ldap

sending a pdf to the clients browser throug https?

custom event in user control call event method by name

generate css

visual web developement server error

required to enter application name on single site installation

custom module problem - authentification

wbecontrols / htmlgenericcontrol and code behind

dnn and css

where is the smtp server settings stored in the dnn database?

secure a webstie using sessions

3.0.10 issue: dotnetnuke.common.controls.form onsubmit

treeview control....several 100 questions :-)

map quest module

loading menu items from accessdatasource

vs2008: frequently crashes (bsod) while debugging

security exception when trying to deserialze/serialize a memorystream

running a windows application on the windows 2003 server

log-off user when browser closes

questions about contact manager (s)

explain microsoft enterprise libary

converting php code to c# help

localization of rich text editor?

upgrade pain

images not appearing, new dnn install

master page drop menu overlap problem

treeview events

where's sjstokes these days?

change relative path problems

 
All Times Are GMT