Control of the page and the controls on a page
I am building a web app that has some pages that are public and some that are only available based on subscription.
Could someone explain the best way (infrastructure wise) how to control whether a server control is visible or enabledand how to control whether a page is viewable or not based on the user and whether or not the user is logged in (or not).
If a user is not logged in I would like some controls to be visible but disabled. I also have to control the URL's in case a person learnsthe URL and tries to type it in.
My question is more towards how to do this database wise. I am u...Paging Paging Paging
I am trying to do paging with my search results and it isnt working very well. Here is what I've tried and I feel I've tried everything, lol, please help me out.
Sub DataGrid1_SortCommand(Sender as object, e as DataGridSortCOmmandEventArgs)
Sub Datagrid1_PageIndexChanged(Sender as object, e as DataGridPageChangedEventArgs)
Dim ds as dataSet
DataGrid1.CurrentPageIndex = e.NewPageIndex
if Session("Search") is nothing then
'Session probably has expired, get the datasource from database
Datagrid1.DataSource = ...Calling a method from a control page on the axpx page where the control page exists.
I have an .aspx page that has a method called grdMain_DataBind(). I have a control page that loads within the aspx page which has its own logic. I have a button on my control page called "SAVE". How can I call the method grdMain_DataBind thats in my aspx logic from the control that exists on that page when I click SAVE button. Is there a way?
If I were you, I'd simply create a "Save" Event within your control. When the Button in your control is pressed, in the Click handler for that Button you can raise the event. Then, within t...Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Why in the world am I getting this error?
The solutions I have seen either don't apply or don't work.
Here is my master page code:<%@ Master Language="C#" AutoEventWireup="false" CodeFile="TechLMSMasters/MainSide.master.cs" Inherits="MainSide" %>
<%@ Register TagPrefix="usercontrol" TagName="Search" Src="~/library/uc/Search.ascx" %>
<%@ Register TagPrefix="usercontrol" TagName="UserName" Src="~/library/uc/UserNameDisplay.ascx" %><!DOCTYPE html PUBLI...Problem Accessing Page Controls in a page that has a master page.
I have a problem with accessing the controls of a page that has a masterpage. I am trying to access the Page.Controls from the code behind in the class file but no controls are returned.I can access single controls (ex. txtAddress.Text) but not the whole array of controls (ex. Page.Controls).
The controls structure is.. MasterPage > PlaceHolder > MyPage.aspx
&n...Error : Content controls have to be top-level controls in a content page or a nested master page that references a master page.
when I make a directory on my root, and in that directory I put a masterpage and a web form ... I get always an error :
Content controls have to be top-level controls in a content page or a nested master page that references a master page.
Does somebody know what the problem is ? Is it possible you can't set a masterpage in a directory ... ?Kind Regards,Joeri Pansaerts.From Bruges, Belgium :)
i've founded ... I had to nest my masterpage ...Kind Regards,Joeri Pansaerts.From Bruges, Belgium :)
Hi Joeri Pansaerts,
I am receiving the same error as the one posted her...ERROR Content controls have to be top-level controls in a content page or a nested master page that references a master page.
This all used to work until about 5 minutes ago. Did I change something? For some reason I am now getting this error: Content controls have to be top-level controls in a content page or a nested master page that references a master page. What I have: I have a masterpage inside of a directory. That directory is a first level directory with its own web.config file....The whole thing is protected by the web.config file above it (in the main public directory). That main public directory has a masterpage as well. I am not currently linking the two masterpages together becuase...Single page with multiple user web controls VS Multiple page with specific user web controls
I have a question regarding single page with multiple user web controls vs multiple page with specific user web controls
Option 1: I am of the opinion to have multiple pages with specific user web controls and use an object to store all the information as the user navigates through the application. And finally at the end, read this object and save all the information to the backend database.
Option 2: My respected team member suggests that we have only one page, with all the specific user web controls and not use an object, instead show/hide the user web controls based ...Using controls from pages, master pages, and user controls
How would I structure my site in this scenario: I'd like to use a dropdownlist all over my site, sometimes in a regular page, sometimes in a master page, and sometimes in a user control. I wish to bind its events programmatically, so normally I would just put that in the codebehind. However, I notice a lot of code duplication because I have to declare the control in everywhere, in my base page (which all my pages inherit from), in my base master page (which all my master pages inherit from) and in my base user control (which all my user controls inherit from).How should I be...convertion from page to content page or from user control to content page
Hi, I have converted an asp.net 1.1 application to 2.0. Now what I am looking for some enhancement. I added a master page and now I want to add other pages as content pages. but those pages which I am converting into content have some user control. Now either I can convert those user control to content pages ( which i want to look for if it is possible), Or I am thinking i shouldn't convert those user control to content pages cause they might be just good. So looking for some of those people opinion who have worked through this so can I get opinion here please.thanks&nb...page up / page down
Name: Kyle Morrison
Product: Deer Park
Summary: page up / page down
page up and page down do not work
mac osx 10.3.9
Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b3) Gecko/20050712 Firefox/1.0+
...Page Down / Page Up
I have tried this on the google groups - advanced search, but get nothing.
So, here is what I am trying to do ...
PB 11.1 / Postgres
: List datawindow on top with all desired records.
: Form Datawindow on bottom showing the detail information for the selected
: I share the datawindow buffer with the detail and manage the scrolling
Now, in the detail window, I have multiple line 'comment' fields.
when the cursor is in the comment field (again multiple lines that usually
scroll outside the 'box'), the user wants to be able to hit page down /...Tab Controls/tab pages/controls within tab pages
I give up! I have a tab control user object - inherited from u_tab - and
some tab pages. Initially only one page is enabled which has a
datawindow. When a valid data is entered in the DW, I need to enable
rest of the tabs - Now - it is giving me a NULL object reference error
during execution for the following statement in an event of the DW -
getparent( ) also giving errors - HELP! How can I do this?
If you have CreateOnDemand set for the tab, then the tab pages are not valid
until the user accesses them. ...Page To Page
How can i call to a Text that has been written in a different page(in a TextBox).
I want to call him to make a SELECT quastion.