SharePoint Page Viewer webpart! (4/16/2007)

I received this question from Ahmad Jadallah:
I am developing a small C# application that I will be showing inside sharepoint server 2007 through the page viewer web part.
I want to be able to show something based on the profile of the currently logged in user.
For example: If the city value of the currently logged in user is Paris then show button 1, otherwise dont show it.
How can I achieve that? I tried the SharePoint webservice but I could not get it to work.
best regards,

Dear Ahmad Jadallah
You are trying to read the user profile info in a wrong way. Remember that Page viewer WebPart cannot and does NOT interact with the page that it opens. In better word Page Viewer WebPart can only get the requested page and display it on the client. It does not execute the requested page as a part of SharePoint page and it does NOT run the requested page in the SharePoint execution context.

  1. To have your page interact with the SharePoint context you have two ways:
    Create your WebPart yourself and interact with the current user like a normal ASP .NET user (User.Identity.Name) and then decide of displaying the controls on the webpart.

  2. Try creating your ASP .NET page under server layouts “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS” and call it under http://servername/_layouts/yourpage.aspx


By: Meador  
Hey there! I just want to offer you a huge thumbs up for the great info you have got here
on this post. I am coming back to your blog for
more soon.
By: Pinson  
I know this web page offers quality based articles and extra information,
is there any other web site which provides these stuff in quality?
By: Mansfield  
Great web site you have here.. It's difficult to find good quality
writing like yours nowadays. I really appreciate individuals like you!

Take care!!
By: Kotai  
Hey I know this is off topic but I was wondering if you knew
of any widgets I could add to my blog that automatically tweet my newest
twitter updates. I've been looking for a plug-in like this for quite some time and was hoping maybe
you would have some experience with something like this. Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your
new updates.
By: Hoy  
Thankfulness to my father who informed me about this web site, this blog is really amazing.
UDIeQu You made some decent points there. I did a search on the topic and found most individuals will agree with your blog.
By: Donaldson  
Thanks a lot for sharing this with all people you really realize what
you're speaking approximately! Bookmarked. Kindly also visit my website =).
We could have a link exchange contract among us
By: Breshears  
I'm amazed, I must say. Rarely do I come across a blog that's both
educative and entertaining, and without a doubt, you have hit the nail on the head.
The problem is something which too few folks are speaking
intelligently about. I'm very happy that I came across this in my
hunt for something concerning this.
By: Ecuyer  
Spot on with this write-up, I truly feel this website needs a great deal
more attention. I'll probably be back again to read through more, thanks for the information!
By: Cohen  
Howdy just wanted to give you a quick heads
up. The words in your post seem to be running off the screen in Firefox.
I'm not sure if this is a formatting issue or something to do
with internet browser compatibility but I thought I'd post to let you know.

The style and design look great though! Hope you get the issue solved soon. Kudos
By: Valdez  
I pay a quick visit day-to-day a few blogs and websites to read
articles or reviews, except this blog gives feature based posts.
By: Gresswell  
great post, very informative. I'm wondering why the opposite
specialists of this sector do not understand this. You must continue your writing.
I'm sure, you have a huge readers' base already!
By: Kushner  
My spouse and I stumbled over here different website and thought I should check
things out. I like what I see so i am just following you.
Look forward to finding out about your web page yet again.
By: Rexford  
Great article.
By: Staton  
I could not resist commenting. Very well written!
By: Swinford  
I blog frequently and I seriously appreciate your content.
Your article has truly peaked my interest. I am going to take
a note of your website and keep checking for new details about once
a week. I subscribed to your RSS feed as well.
By: Strain  
Keep on working, great job!
By: Salvado  
Hi there, You've done an incredible job. I'll certainly digg it and personally suggest to my friends.
I am confident they'll be benefited from this site.
By: Goode  
When I originally commented I seem to have clicked the -Notify me
when new comments are added- checkbox and now each time a comment is added I get four emails
with the exact same comment. There has to be an easy method
you are able to remove me from that service?

Many thanks!
By: Fitflop UK Classic  
Write more, thats all I have to say. Literally, it seems as though you relied on the video to make your point. You clearly know what youre talking about, why waste your intelligence on just posting videos to your weblog when you could be giving us something enlightening to read?
By: Bouchard  
It's actually very complicated in this active life to listen news
on Television, so I simply use internet for that reason, and get
the newest news.
By: Cattanach  
I'm gone to convey my little brother, that he should also
pay a visit this blog on regular basis to obtain updated from hottest news update.
By: Canter  
Have you ever considered about adding a little bit more than just your articles?
I mean, what you say is important and all.

Nevertheless imagine if you added some great images or videos to give your
posts more, "pop"! Your content is excellent but with images and videos, this website could definitely
be one of the very best in its niche. Very good blog!
By: Buy PoE Items  
What if I had the guts to quit my job.
By: cheap POE currency  
Leave me alone !
By: cheap POE currency  
You're very professional.
By: Glowacki  
My brother recommended I may like this blog. He was entirely right.

This submit truly made my day. You can not believe
simply how a lot time I had spent for this information! Thanks!
By: Final Fantasy XIV Gil  
Come on, Stop!
By: adidas nmd for sale  
Iok��s pretty much nothing effortless to find out ans matter oy net ar compared to textbooks, as trying to find found this paragraph at this web page:
By: nike air max  
Have you ever thought about taking in a little bit more than just with no articles? I consist of, whdirectly onto you say is fundamental and everythingself help anxiety Nevertheless think of igary you addimpotence problems some great appearances or videos to give yougary the gadget guy posts put on, inches widthpoplong! your health content is excellent and thus with pics and videos, tyour sweetheart website could certainly be roll of the most beneficial in its make trades. most significant blog.
By: louis vuitton bags  
Do you know each other? levaquin 250 mg tab a??I would say Andy is the director of basketball for Findlay Prep (and he) is our admissions person for the high school,a?? Ahlborn said. a??We have established criteria a?? Andya??s working off an established criteria (so ita??s) not just Andy thinks hea??s a good basketball player and so we should take him.a??
By: buy NBA 2K17 MT  
I'll fix it!
By: nike air max  
Republican presidential candidate Mitt Romney's campaign has targeted supporters who don't typically vote in every election, a nod to the campaign's efforts to encourage supporters to vote absentee by mail or cast their ballot at an early voting location.��Investigators believe the wife would have collected Adams�� insurance money,000 in rare stamps and jewelry, he said. Monster's lawyer Daniel Callahan said the company hired a team of physicians to review the medical records in the case, When we spoke to him at the end of the week he said, so I'm writing about it just to express myself, the 20-year-old singer doesn't see what the big fuss was all about."
By: fifa 17 ps4 coins  
No, I know.
By: fifa coins  
The youre really talented .
By: buy albion gold  
Take my word .
By: u4fifa  
You 're so smart.
By: cheapest fut 16 coins xbox 360  
Take my word .
By: Blade and Soul gold  
You did it !
Your name: