Web Forms :: Access Members Control On MasterPage?

Dec 17, 2010

The website will have public and private (members) access.I'm using VB and MS access database. Registering, login, MasterPage (Master1), default.aspx and users (members.aspx) pages are already set up. What I wanted or what I'm thinking to do is to also base the members.aspx on the MasterPage.

When a user logged in, I wanted to add additional menu (reserved only to members) to the MasterPage and
remove/hide unnecessary menu. Here is a scheme of what I want:

MasterPage + default.aspx: (visible to the public)
Menu1
Menu11, Menu12, Menu13
Menu2
Menu21, Menu22, Menu23
MasterPage + members.aspx: (When user login)
Menu1
Menu11, Menu12, Menu13
Menu3
Menu31, Menu32, Menu33

If the user logout, it will return to MasterPage + default.aspx. Nowing that if the user authentication successful, he will redirected to members.aspx,

1. how can I, when loading members.aspx, manage the MasterPage so that I can show and hide some of its menu? how to use members controls on the MasterPage?

2. in case I'm wrong with what I'm trying to to do, what is your advice?

3. FYI, I'm using VB. Any code in C# will also be OK. I will just have to convert it.

4. I might probably use placeHolder to show and hide these menu in the Page_load event of members.aspx (refer to what I don't want in 3).

View 6 Replies


Similar Messages:

Security :: Lost Access To Control Members And Roles?

Aug 8, 2010

I am working on an application that resides on a development server on our internal network. The application was originally written to use Membership and Roles. We got busy almost a year ago before the app was finished, and now we are trying to get it ready to use internally.

The login page works just fine, but I have lost the ability to controls users and roles. I am running Visual Studio 2010 Professional now on a Windows 7 VM. I can open the application fine but there is no Web Administration Tool available for me to manage users or roles. If I go to Website -> in Visual Studio, there is no option for ASP.NET Configuration in the drop down menu. It simply isn't there.

How can I regain access to manage users and roles for this application? We are using Forms authentication and the database resides on a SQL Server 2005 instance on a separate box from the web server and my local VM.

View 6 Replies

Web Forms :: Access Masterpage Control From Other Page

Dec 27, 2010

i have a masterpage and an default.aspx page that derives from masterpage. On default.apsx, i list products. when i click add basket buton that product is added to shoppingbasket. i do this using jquery. On mastepage,there is a label that shows how many product is in shopping basket. i want to do this. when i click add basket on default.aspx, label control on masterpage show the new product count on shoppingbasket.How can i access masterpage control and change using javascript/jquery from default.aspx.

View 7 Replies

Web Forms :: Trying To Access A MasterPage Control From A Content Page?

Apr 12, 2010

I have a textbox on a masterpage called txtNotes

I have a button on a content page called btnNotes

I am trying to access the txtNotes textbox on the MasterPage using the following code and I get and error saying "Object reference not set to an instance of an object.

[code]....

View 1 Replies

Web Forms :: Finding A Way To Access To MasterPage Property From User Control?

Feb 2, 2010

I have a Master Page that has several User Controls on it. The MasterPage code behind does some work to calculate a value that needs to be used in all of the UserControls. From the UserControl code behind, how do I access the public property of the MasterPage that I have set?

View 2 Replies

Web Forms :: Access Hidden Field From One Masterpage To Another Masterpage?

May 3, 2010

I have 2 masterpages. (Default.master and User.master).I have a hidden field in Default.master then how can i get the hidden field value of Default.master file from User.master.is there any way to access that hidden field like: Request.form("hidID") ?

View 2 Replies

Web Forms :: How To Access Classes Or Their Members From App_Code Folder

Apr 27, 2010

I have a single project. and I have two folder in it. In the 1st folder I have a class named Class1 and in the 2nd folder I have a class named Class2. Can anyone tell me how I can access members of Class1 in Class2. I have tried by adding namespace in Class1 and Using that namespace in Class2. But it is giving error. It is easy to access classes or their members from App_Code folder. I don't want to put my classes in app_code folder.

View 5 Replies

Web Forms :: Accessing Control In Nested MasterPage From Parent MasterPage?

Feb 4, 2010

I have a MasterPage (MasterPage.master) with 2 child MasterPages (specialMaster.master and standardMaster.master). From the MasterPage.master I need to get at some of the controls in one of the children, specialMaster.master, say for example to hide certain
content if a session variable is not null.

View 2 Replies

Lock A Record When Two Members Are Trying To Access It?

Jul 5, 2010

I have the scenario like this,

My environment is .Net2.0, VS 2008, Web Application

I need to lock a record when two members are trying to access at the same time.

We can do it in two ways,

By Front end (putting the sessionID and record unique number in the dictionary and keeping it as a static or application variable), we will release when the response is go out of that page, client is not connected, after the post button is clicked and session is out. By backend (record locking in the DB itself - need to study - my team member is looking ).

Is there any others to ways to do and do I need to look at other ways in each and every steps?

View 3 Replies

Security :: Filtering Members List / Only Members Whose Name Contains The Typed Characters Will Show Up In The Gridview?

Apr 28, 2010

Our site has a page for maintenance of existing members (e.g. adding / changing roles, etc.)This page currently uses a gridview to show a complete list of all members, based on GetMembers() method to populate it.However, as the number of users has grown to several hundred, it has become difficult to locate a particular user by paging through several pages.Is there a way to narrow down this list, maybe with a filtering textbox, so that as you start typing into that textbox, only members whose name contains the typed characters will show up in the gridview?

View 8 Replies

Access Global.asax Static Members?

Dec 30, 2010

If we declare a static variable in Global.asax then how to access it inside an ASP.NET page ?

<script runat=server">
public static object myObject = new MyClass();
// Application_Start() and other stuff goes here.
</script>

And, is this a good idea for storing a global object (same instance for all requests) ?

View 3 Replies

Web Forms :: Access Function From Masterpage?

Jun 1, 2010

I have a function called Public Shared Function get_userDB() As String in my MastePage.master.vb file that i would like to access from my users page that is connected to the master page.

I have tried with: me.master.get_userDB()

But that won't work. It says that my function is not a member of my masterpage. What im i doing wrong?

View 4 Replies

Web Forms :: How To Access A Panel Located In MasterPage

Aug 22, 2010

I have used a lot, in my application, the code below in order to access a Panel located in MasterPage.

CType(Master, MasterPageName).Panel1()

But, right now I need to do the same command above, in a page located within an iFRAME. The parent page (that calls the iFrame) is normally using that MasterPage. But the iFrame isn't.

View 3 Replies

Web Forms :: Access Variable Of Masterpage From Content?

Sep 6, 2010

i want access in my variable of masterpage from content for change language of my site ;

i define a int in my masterpag and want write a quary for show data from database

View 3 Replies

Web Forms :: Access To A Public Method In A MasterPage?

Feb 22, 2011

using the code below how come I cannot access a public method inside of a Site.Master page from a page using the Site.Master page:

Site.Master page:

[Code]....

View 3 Replies

Web Forms :: Cannot Access Public Methods On MasterPage

Sep 9, 2010

I have a a public method in my code behind on the site.master page

[Code]....

I wish to call applyUserRole() from Default.aspx

On Default.aspx I have ..

[Code]....

[Code]....

Master. the method is not appearing. I've seen other post where people are having this issue but I can't find an answer.

View 11 Replies

Web Forms :: Access Querysting Values From Masterpage's Pageload Method?

Mar 25, 2011

I access querystring values in each content page's pageload method to get Username and Id. Is there a way I access the querysting values from Masterpage's pageload method and each content page goes to Masterpage to get those values without creating any other local variables in content pages? I know this can be done with Session's or view state but I was thinking to reduce redundancy of accessing query string in each content page.

View 3 Replies

How To Access A Module Or A Public Class With Public Shared Members From Inline Vb Code

Feb 10, 2011

I can access a module from code behind but not from the aspx page in inline VB code <% ... %>.

I know its got to be something simple but I can't seem to find the answer anywhere.

View 1 Replies

C# - How To Access A Private Data Members Of Base Class In The Derived Class

Aug 20, 2010

Since we can access the private data member of base class in the derived class with the help of friend function. How can we do the same in C# asp.net? I mean whats the alternative of friend function in C# asp.net

View 2 Replies

How To Access The MasterPage Variable From The Others Page

Mar 14, 2011

i want to accessing the MasterPage variable, such as Panel, from the others page. How to do that? I have try this code:

CType(MasterPage.FindControl("PanelLogin"), Label).Visible = False

I want to call PanelLogin and make it visible (before called, it should be invisible) while opening the page. The code is error.

View 1 Replies

C# - Access Page Controls While Using MasterPage?

Nov 25, 2010

I tried to write a little function to reset the form to default. Therefore I want to access the Controls of the page. I'm using a MasterPage. Maybe because of that, I have no access to the ContolsCollection via Page.Controls.

View 4 Replies

How To Access Variables Defined In Masterpage.master.vb

Feb 1, 2010

I have a collection of cookies filled with Browserhawk information in masterpage.master.vb such as;

Dim useCSS as boolean = 0
Response.Cookies("Stylesheets").Value = brHawk.Stylesheets
if Response.Cookies("Stylesheets") = True then useCSS = 1
if Stylesheets is True I set useCSS to 1, if false I set useCSS to 0

I need to access these in the section of the masterpage.master such as;

if useCSS = true
Then load stylesheet
else
Dont load stylesheet

I'm having problems finding the right syntax to get this working.

View 2 Replies

C# - Access Controls On ContentPages Via Javascript By MasterPage?

Oct 10, 2010

I need my MasterPage to be able to get ControlIDs of Controls on ContentPages, but I cannot use <%= xxx.CLIENTID%> as it would return an error as the control(s) might not be loaded by the contentplaceholder.

Some controls have a so called BehaviourID, which is exactly what I would need as they can be directly accessed with the ID: [Asp.net does always create unique IDs, thus modifies the ID I entered] Unfortunately I need to access

e.g. ASP.NET Control with BehaviouraID="test"

document.getElementById("test")

if I were to use e.g. Label control with ID="asd"

document.getElementById('<%= asd.ClientID%>')

But if the Labelcontrol isn't present on the contentpage, I of course get an error on my masterpage.

View 4 Replies

MVC :: Can Access Masterpage Dropdown Value In Controller Action

Jan 17, 2011

I have a masterpage on which i displays groups that user can access now i want to gets its selected value in other controllers for saving with the records. I want to know if it is possible in asp.net mvc 2 and if not then what is the way around for it

View 1 Replies

C# - Access Properties From Page In ContentPlaceholder In MasterPage?

Feb 10, 2011

I have following environment:

masterpage with a contentPlacholder multiple pages which use this masterpage and implement a base-class (fooPage) fooPage has a certain property (fooProperty)

[Code]....

Obviously this is not going to work - but how can I achieve this?

I know the alternative: call a method from the masterPage in the contentPage with fooProperty as a parameter - but i would like to rather have a pull-system in this case...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved