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

Using master page to use repeatative controls

35
Dear all,
very new to asp.net 2.0.need help urgently.
suppose i have 3 pages.
page1-
textboxname
textboxage
textboxAddress

page2-

textboxname
btnSubmit
textboxage
textboxAddress

page 3-

textboxname
textboxage
textboxAddress
labelgreetings

so u can see,in all the 3 pages i hv 3 common fields textboxname,textboxage
textboxAddress.so my ques is can i first create a master page having those 3 common controls and can use it for 3 content pages.is master page only for look/feel or i can use it 4 this purpose also.i need some of the common fields 2 b disabled in content pages.and my content page's controls will be inserted in between master page's control.

in real scenario,i hv arnd 15 fields common.plz suggest me the right way 2 do it...waiting
Lipsa
Jun 18 '07 #1
4 1234
r035198x
13,262 8TB
Dear all,
very new to asp.net 2.0.need help urgently.
suppose i have 3 pages.
page1-
textboxname
textboxage
textboxAddress

page2-

textboxname
btnSubmit
textboxage
textboxAddress

page 3-

textboxname
textboxage
textboxAddress
labelgreetings

so u can see,in all the 3 pages i hv 3 common fields textboxname,textboxage
textboxAddress.so my ques is can i first create a master page having those 3 common controls and can use it for 3 content pages.is master page only for look/feel or i can use it 4 this purpose also.i need some of the common fields 2 b disabled in content pages.and my content page's controls will be inserted in between master page's control.

in real scenario,i hv arnd 15 fields common.plz suggest me the right way 2 do it...waiting
Lipsa
Do not post questions in the Articles section.


Moved to the forum.
Jun 18 '07 #2
Frinavale
9,735 Expert Mod 8TB
Hi Lipsa,

I would recommend creating a user control to collect this information.
For instance if you had to collect Name,Address,City... for a dealer and then Name,Address,City for the dealer's customers I'd suggest creating 1 WebUserControl "ContactInformationControl" that holds this information.

A web user control is much like a regular object except that it has the graphical side as well. You can give it public properties and pull the information out of the control in any page...all you have to do is drag it onto the page that you want it to be on...and you can create as many of them as you'd like too!

Treat them as you would treat any aspx page. :)

Hope this helps you

-Frinny
Jun 18 '07 #3
nmsreddi
366 256MB
Hello

Master page can solve your problem but it is not exactly solution for your problem ,the best way is to use webusercontrol ,which you candrag and drop where ever required ,Master page is used when you want to display some logos or any site headings or any menus which can be shown on most of the pages ,

Controls can also be placed on master but it is quite risky process while accessing those controls in your content pages later in your application.better user webusercontrols which solves your problem
Jun 19 '07 #4
lipsa
35
Thanks a lot for the response.i am going to use usercontrol instead.
Lipsa
Jun 27 '07 #5

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

Similar topics

10
by: George G. | last post by:
Hi there, I am busy writing a new asp.net application and I am reusing some of my existing asp functions and methods in a user control. I need access to session, request and response in some of...
1
by: Friso Wiskerke | last post by:
Hi All, We've got an VS.2003 ASPNET (VB) webproject which we would like to convert to VS.2005 so that we can make use of the Master Page feature. Converting the initial pages to 2005 is not such...
1
by: rushikesh.joshi | last post by:
Hi All, I want some charting functionality in my ASP.NET application. I want to show a multiple bar on my web page. It's based on down time of different servers. like server1: down betn 4 AM...
3
by: Brian | last post by:
Master pages run Page_Load() from the deepest level of nesting outwards. So if I write a content page based on a nested master which is then based on some other master, the Page_Loads are executed...
4
by: Boris Yeltsin | last post by:
OK, on my Master Page I have a control: <a id="hypTabAccount" href="#" runat="server">Account</a> Now, in the code-behind (Root.master.vb) I can refer to it simply thus: ...
2
by: Chris Davoli | last post by:
I initially created a master page for a common look and feel in my project. I am trying to refer to a user control that is on a master page. When I add a new web form to the project I check the...
4
by: lichaoir | last post by:
I have two questions about the use of Master Page: 1. How to access properties and controls in the master page from content page? (I know I can use the "FindControl()" method of the "Master"...
0
by: jgdean14 | last post by:
Hi - We have an Early .NET 2.0 App that was created without Master Pages about a year ago. We opted for more of a MVC framework and dynamically- loaded User Controls. We use Custom User-Controls...
3
by: Cirene | last post by:
When you set the value of a user control in a master page, do you have to reference it differently? Also, do they have to be given different names in the templates? For example, this is what I...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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,...
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...

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.