CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.club_web_site_starter_kit Tags:
Item Type: NewsGroup Date Entered: 7/26/2007 4:32:10 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 16 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
GnrlPatton
Asp.Net User
Admin link in Master7/26/2007 4:32:10 PM

0/0

I've got the MaineOne admin tool integrated with the Club site.  I would like to have a clickable image display in the footer of all pages that will take the user to the WebAdmin.aspx page IF they are an administrator.  I'm attempting to add it to the footer section of the Default.master, but it doesn't seem to be recognizing the User property like the other pages do.  Other pages that reference the IsAdmin work fine, so I'm wondering if there is something different with the master page.

Here's the code I inserted for the master page.

 In the <script> tag, I added three lines for the Page_Load (bolded):

Private IsAdmin As Boolean
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If Page.User.Identity.IsAuthenticated Then
Membership.GetUser(Membership.GetUser.ProviderUserKey(), True)
End If
IsAdmin = User.IsInRole("Administrators")
Admin.Visible = IsAdmin

End Sub

And then in the footer section, I added a panel tag:

<p>
<asp:Panel runat="Server" ID="Admin" Visible='<%#IsAdmin %>'>
<asp:Hyperlink ID="AdminHyperlink" runat="server" BorderStyle="None" NavigateUrl="~/webadmin.aspx"><img alt="Restricted Area" src="images/sm_RestrictedArea.jpg" />
</asp:Hyperlink>
</asp:Panel>
</p>

Any idea how to get this to work?

Thanks,
Kevin

MaineOne
Asp.Net User
Re: Admin link in Master9/20/2007 8:54:59 PM

0/0

 Change to this.

 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        
        If Page.User.IsInRole("Administrators") Then
            Admin.Visible = True
        End If

    End Sub

 

<p>
<asp:Panel runat="Server" ID="Admin" Visible=False
<asp:Hyperlink ID="AdminHyperlink" runat="server" BorderStyle="None" NavigateUrl="~/webadmin.aspx"><img alt="Restricted Area" src="images/sm_RestrictedArea.jpg" />
</asp:Hyperlink>
</asp:Panel>
</p>

 

 


[email protected]

GnrlPatton
Asp.Net User
Re: Admin link in Master9/26/2007 4:39:05 PM

0/0

Thanks boss, I got it sorted out.  I love your admin tools for this starter kit!

Kevin

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
ASP.NET 3.5 For Dummies Authors: Ken Cox, Pages: 404, Published: 2008
Macromedia Dreamweaver 8 with ASP, Coldfusion and PHP: Training from the Source Authors: Jeffrey Bardzell, Pages: 508, Published: 2005
Upgrading and Repairing Networks Authors: Terry William Ogletree, Scott Mueller, Pages: 1248, Published: 2003
Microsoft Exchange Server 2003 Advanced Administration: Advanced Administration Authors: Jim McBee, Pages: 956, Published: 2006
Linux Timesaving Techniques for Dummies Authors: Susan Douglas, Korry Douglas, Pages: 512, Published: 2004
ASP.NET 2.0 Instant Results Authors: Imar Spaanjaars, Paul Wilton, Shawn Livermore, Pages: 456, Published: 2006
ASP.NET 2.0 Website Programming: Problem-design-solution Authors: Marco Bellinaso, Pages: 576, Published: 2006
Microsoft Office SharePoint Server 2007: The Complete Reference Authors: David Matthew Sterling, David Sterling, Pages: 788, Published: 2007

Web:
Admin link in Master - ASP.NET Forums Admin link in Master. Last post 09-26-2007 12:39 PM by GnrlPatton. 2 replies. Sort Posts:. Oldest to newest, Newest to oldest ...
Master of Business Administration - Wikipedia, the free encyclopedia The Master of Business Administration (MBA) is a master's degree in business ..... Business of administration links at the Open Directory Project ...
Master Account User Details - Yahoo! Search Marketing Help When a Master Account Administrator resets a user's password, the user receives an email containing a link. The user must click the link and select a new ...
LINK >> Study Programmes >> MBA >> Master of Business ... of Management LINK. The largest business school in Russia and the CIS. | Home |; Russian version | ... Master of Business Administration Diploma ...
Accelerated Master of Tourism Administration (AMTA) Program LINK:Attend an Information Session The George Washington University ... The Master of Tourism Administration degree program is designed to prepare students ...
Masters of Public Administration in Public and Nonprofit ... The Master of Public Administration in Public and Nonprofit Management and Policy educates professionals committed to public service, in any sector. ...
WSU | CLAS | Master of Public Administration | MPA Links Master of Public Administration. College of Liberal Arts & Sciences > Master of Public Administration > MPA Links. Public Administration Links ...
Related Links : Master of Public Administration : University of ... The Master of Public Administration program partners with CRS to better inform public policy development, implementation, and study. ...
The University of British Columbia : Master of Health ... Links · FAQs · Site Map · Contact. Links. Links to come. Copyright © 2006 The University of British Columbia all rights reserved. Links ...
Mount St. Mary's University: Master's of Business Administration Link: Undergraduate Continuing Studies (Accelerated-MPAS) · Link: Masters of Business Administration · Link: Masters of Education ...

Videos:
America The Beautiful - '37 Martin w/vintage Otto Link The is my 4th of July gift to all, especially those in harms way around the world, doing the bidding of our out of control administration in DC that ...
Zombie Master - Undead House Vol.1 Thx for watching. Music used: Sound of Matrix Xp Neo vs Smith - Matrix Revolutions Moskau - Dschinghis Khan Pokemon main theme Leeroy Jenkins Fun Tim...
Master1.ram mast1
Sounds Like Latvia Uploaded by http://onkulis.com Promotional video "Sounds Like Latvia" features what could become a memorable trademark for the city of Riga - talkin...
A Pravda Master releases new book The White House is facing fresh accusations of a clandestine propaganda campaign after it emerged this week that it granted regular access to a right...
Master of Science Whenever BMCC science faculty members Sarah Salm, Patricia DeLeon and Lauren Goodwin apply for molecular biology research grants, they are often met ...
GM PowerHack for patch 3.02! [now works on live servers!!] DOWNLOAD LINK: http://www.megaupload.com/se/?d=43O7EV90 Finally it's here! I have now updated the GM Power Hack to work with the latest patch 3.0.2!...
About Us: Eric aka likeomg The master of SEO, likeomg! Eric is like a magician, casting spells with keywords. He's got his finger on the pulse of Etsy, and he's always masterm...
Hijacking Catastrophe: 9/11, Fear & American Empire http://www.HijackingCatastrophe.org The 9/11 terror attacks continue to send shock waves through the American political system. Continuing fears abo...
Bungie.net Secret File ? The Secret file on Bungie.net... It seems like a screenshot but u can't view it nor download it or even succesfully copy it to ur fileshare. Plus to ...




Search This Site:










ssl net remoting .need some help !

can't redirect

how do i use web.config if directory is no configured to be application?

update to database with empty smalldatetime field

pass variable through include url

writing a file to a site's subfolder

drag and drop gridview document(s - one of more documents) into treeview folders.

which is faster ?

page control

css disappears on reload of aspx page

other controls in the page are overlapping pop-up calendar control

mail sending pblm

menu question?

creating a folder on the server

component graph?

creating thumbs using ashx

i wanna know who's online

hello - link and creat database in web developer.

sql update problems

referencing session variables from a code module???

stress testing for possible platform change

object to object initialization in c#.net

offtopic javascript que

grabbing table informaton from page.

adding a hyperlink to htmlbody

primary key issue

sql server 2005 tools with sql server 2000 error

what next!!!

directory listings

detecting dead links and unreferenced pages

  Privacy | Contact Us
All Times Are GMT