473,698 Members | 2,411 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Displaying different content on one Asp.net page(populated from a DB)

I want to have a asp page that would be displaying different contents
depending on the user that logged in.
And the data would be populated from the Database!
Any ideas on how to do this

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 1456
Use Forms Authentication which provides this kind of functionality. Here's
more info:
http://www.dotnetbips.com/displayarticle.aspx?id=9
http://www.4guysfromrolla.com/webtech/121901-1.2.shtml
http://www.dotnetbips.com/displayarticle.aspx?id=117

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"naijacoder naijacoder" <na********@tou ghguy.net> wrote in message
news:%2******** *******@TK2MSFT NGP11.phx.gbl.. .
I want to have a asp page that would be displaying different contents
depending on the user that logged in.
And the data would be populated from the Database!
Any ideas on how to do this

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2
Thx alot but i have a question for you:-
can't get WindowsPrincipa l.IsInRole() to work for me when using
Windows Authentication. Here's a snippit of code from my C#
codebehind page:

WindowsPrincipa l wp = new WindowsPrincipa l(
WindowsIdentity .GetCurrent() );
lblUser.Text = wp.Identity.Nam e;
Label1.Text = wp.IsInRole(@"D OMAIN\group").T oString();
where "DOMAIN\gro up" is a valid group name. The username shows up
correctly as "DOMAIN\usernam e" but for any non-builtin roles,
IsInRole() returns false. Does anyone have suggestions as to why this
is not working?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2433
by: David | last post by:
I am retreiving information from a database and it works ok, but its rather a lot and I like to limit each web page to 10 rows of data, then put the next ten on a new web page, probably with a back|forward buttons at the bottom. Problem is I really not sure how to do this any would hoping someone could throw me some advice! Cheers!!
2
2785
by: Paul M | last post by:
Hi there, i hope someone can help me out here.. I have a input screen where i want the user to enter text in 2 different languages, english and macedonian. How is it possible to make the macedonian input boxes so when you type into them, it is entered into macedonian font? I dont want the users to be downloading anything also. thanks,
2
6894
by: shyamal | last post by:
I want to display memory content using C++ on LINUX. For example, the user may ask to display 256 bytes from 0x1000ff00. The problem is , if any location is invalid, the program will coredump because of attempt to access invalid memory.I understand that in Windows OS there is a function that tells if a memory location is valid or invalid. Is there a similar function in Linux? How does gdb display memory content? I will appreciate a...
0
865
by: Panther240 | last post by:
I am displaying a Pie Chart in a browser.I am coding using C# in ASP.net.I am using System.Drawing and System.Drawing.Imaging. I had selected Response.ContentType = 'Image/jpeg" I have other controls in the page like Text Controls which do not get displayed if I select Response.ContentType = 'Image/jpeg" I want to dispaly Text controls in a form as well as this Pie chart. What should I do to overcome this? Thanks
3
1658
by: sonic | last post by:
Hi, displaying information on a page as MS Word document seems to be as simple as: //OnLoad Response.ContentType = "application/msword"; Response.Write ( MyContentString ); (this assuming intranet site environment with users ensured to use certain version of MS Word on their workstations)
3
1846
by: Allerdyce.John | last post by:
Hi, Is there an easy way in PHP which send outs different content depends on User Agent String value? If yes, is there an example/documentation? Thank you.
4
2075
by: zacks | last post by:
I am developing a C#.NET application in VS2005 that needs a function that allows the user to edit some text content stored in a Text column in a database. I have a TextBox control with AcceptsReturn, AcceptsTab and MultiLine properties all set to True. When I set the Text property of the control to the string returned from the database and show the form, the content in the textbox isn't "formatted". All newlines appear as a funky...
7
6843
kaleeswaran
by: kaleeswaran | last post by:
Hi! i am trying to display different content with the same page.how to do that?... my idea is the page is static but the content will be displayed on the page dynamically change when the user click the submit button... give me some idea..... thank you, kaleeswaran
2
1599
by: zigby | last post by:
HI there, I am new to PHP and a lot of other web development languages so any help in laymens terms would be great. This is my problem: I have been given 2 links to php urls that display a list and search page of my clients used cars from another content management providers database. I need to know what is the best way to represent this up to date data on the clients website. Currently I am using an Iframe which does everything I...
0
8675
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, 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...
0
8604
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,...
0
9029
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 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...
0
8862
tracyyun
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...
0
7729
agi2029
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...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
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
2
2331
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2002
bsmnconsultancy
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...

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.