I've couple of button on master page, based on user login from default.aspx
i control visibility of controls. I thought once i hide the button from
default.aspx it should be same for other pages aswell. but it doesn't. it
works only for default.aspx only.
How can i do that? do i need refresh master page or call my condition in
every page to setup master's button visiblity
Thanks
Ganapathi 4 7647
Have you tried setting the button visibility from the Master Page's Load
event?
If not, that's what I would suggest.
--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider http://SteveOrr.net
"Ganesh" <gs******@yahoo .comwrote in message
news:uR******** ******@TK2MSFTN GP05.phx.gbl...
I've couple of button on master page, based on user login from
default.aspx i control visibility of controls. I thought once i hide the
button from default.aspx it should be same for other pages aswell. but it
doesn't. it works only for default.aspx only.
How can i do that? do i need refresh master page or call my condition in
every page to setup master's button visiblity
Thanks
Ganapathi
"Ganesh" <gs******@yahoo .comwrote in message
news:uR******** ******@TK2MSFTN GP05.phx.gbl...
I've couple of button on master page, based on user login from
default.aspx i control visibility of controls. I thought once i hide the
button from default.aspx it should be same for other pages aswell. but it
doesn't. it works only for default.aspx only.
How can i do that? do i need refresh master page or call my condition in
every page to setup master's button visiblity
Presumably once the user has logged on, then the visibility of the buttons
remains the same for the entire duration of the session?
If so, store a boolean Session variable and point your MasterPage at it e.g.
Global.asax.cs
---------------
void Session_Start(O bject sender, EventArgs e)
{
Session["MyLoginVariabl e"] = false | true; // initial value, as
required
}
default.master. cs
-----------------
protected void Page_Load(objec t sender, EventArgs e)
{
MyButton.Visibl e = (bool)Session["MyLoginVariabl e"];
}
default.aspx.cs
---------------
protected void cmdLogin_Click( object sender, EventArgs e)
{
Session["MyLoginVariabl e"] = true | false; // depending on result of
login
}
--
Mark Rae
ASP.NET MVP http://www.markrae.net
Hi,
I don't know how complex your soulution is but did you think about using
LoginView control?
Regards,
Ladislav
"Ganesh" wrote:
I've couple of button on master page, based on user login from default.aspx
i control visibility of controls. I thought once i hide the button from
default.aspx it should be same for other pages aswell. but it doesn't. it
works only for default.aspx only.
How can i do that? do i need refresh master page or call my condition in
every page to setup master's button visiblity
Thanks
Ganapathi
On Aug 14, 7:46 am, Ladislav Mrnka
<LadislavMr...@ discussions.mic rosoft.comwrote :
Hi,
I don't know how complex your soulution is but did you think about using
LoginView control?
Regards,
Ladislav
"Ganesh" wrote:
I've couple of button on master page, based on user login from default.aspx
i control visibility of controls. I thought once i hide the button from
default.aspx it should be same for other pages aswell. but it doesn't. it
works only for default.aspx only.
How can i do that? do i need refresh master page or call my condition in
every page to setup master's button visiblity
Thanks
Ganapathi- Hide quoted text -
- Show quoted text -
Hi Thanks for your email, I don't use any login controls from
microsoft, I think it's not user friendly and needs another database
to store all the user information. I want to have userinformation in a
table with some more additional information which is not available in
the login controls.
I change the master control visibility from details page, i'll try
with master page load This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: M.Siler |
last post by:
Let me first by saying I am NOT a .net programmer, but am very skilled with
ASP, JavaScript, HTML, DHTML, Flash development.
I've been reading through posts here about Frames vs. Master Pages and there
seems to be the thought of why use Frames when you can use a Master Page?
How does a Master Page only update a section without re-displaying the
entire page. We have a site that has some small swf banners for lack of a
better term that we...
|
by: David Thielen |
last post by:
Hi;
Any strong arguments on using master pages vs frames when the header &
footer are always the same and the main body is the part that keeps changing?
--
thanks - dave
|
by: LilC |
last post by:
I'm creating an application that has a standard layout for all pages.
The information that is displayed in the layout will be dynamic based
on the user that is logged in. Thus when a page is browsed to, I need
to check to see if the user has logged in or not. Then if they have
logged in, I need to pull their information from the database to
display in the header.
In previous applications, I made use of a base web page that all the...
|
by: EagleRed |
last post by:
I am writing an ASP.NET 2.0 application that uses master pages. I have some
pages that must not be cached on the client. In ASP.NET 1.1 I achieved this
using metatags:
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
This tags are part of the <headelement. Sample code that I have seen
shows how to add metatags of the form:
|
by: sck10 |
last post by:
Hello,
I have the following in my Master Page that I am using as a redirect
template:
<head id="headRedirect" runat="server">
<meta id="metaRedirect" http-equiv="Refresh" content="2;
URL=http://www.mysite.com/" />
<title>Page Redirect</title>
</head>
| |
by: Andrew_Vodo |
last post by:
Hi,
I'm developning ASP.Net 2.0 application which will use Google Map.
The page with Google Map uses master page.
As Google map uses client-side script, the first problem is where do I
have to run Google Map creation and population script?
I can't run it in master page on load, as this master page is used by
another pages, which do not use Google map.
|
by: Argirop |
last post by:
I have a page Default.aspx. Its first line is the following:
<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"
AutoEventWireup="true" CodeFile="default.aspx.cs"
Inherits="MyCompany.MyApp.default" Title="Untitled Page" %>
The first line in MasterPage.master is the following:
<%@ Master Language="C#" AutoEventWireup="true"
CodeFile="MasterPage.master.cs" Inherits="MyCompany.MyApp.masterpage" %>
|
by: Jeff Allan |
last post by:
Hello,
I am starting to use Master pages. I understand the concept that these
pages should remain passive. So, I need a little assistance.
Scenario:
1. Master page with a search box & submit button
2. several pages that use this master page
3. based on the value placed in the search box, I want to refresh the data
|
by: Rob |
last post by:
Hi,
I have a master page that contains a table layout. The contentplaceholder is
located in one of the table cells. With frames technology it was possible
for hyperlinks to load the linked pages into a frame without having to
reload any other frames.
Is it possible to replicate this kind of behaviour using master pages and
content pages? In other words, I want only the cell that contains the
contentplaceholder to refresh when the...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
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();...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |