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

I received this question from Ahmad Jadallah:
I am developing a small C# asp.net 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


Regards
Alireza


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
URL: http://goo.gl/RcybAC  
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.
URL: http://c.or.at/minecraft804916  
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!
URL: http://goo.gl/RcybAC  
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
URL: http://short.kure.at/minecraft718963  
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.
URL: http://ralive.de/minecraft715701  
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!
URL: http://ralive.de/minecraft351483  
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.
URL: http://goo.gl/BCKDt7  
By: Rexford  
Great article.
URL: http://go-to.blog/minecraft-155465  
By: Staton  
I could not resist commenting. Very well written!
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D9%85%D8%B4%D9%87%D8%AF-%D8%A2%D8%B0%D8%B1  
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.
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%DA%A9%DB%8C%D8%B4-%D9%86%D9%88%D8%B1%D9%88%D8%B2  
By: Strain  
Keep on working, great job!
URL: https://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D9%85%D8%A7%D9%84%D8%B2%DB%8C-%D8%A7%D8%B1%D8%AF%DB%8C%D8%A8%D9%87%D8%B4%D8%AA  
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.
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D8%AA%D8%A7%DB%8C%D9%84%D9%86%D8%AF-%D9%86%D9%88%D8%B1%D9%88%D8%B2  
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!
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D8%AA%D8%A7%DB%8C%D9%84%D9%86%D8%AF-%D8%B2%D9%85%D8%B3%D8%AA%D8%A7%D9%86  
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?
URL: http://www.fitflopssaleclearanceuk.com/fitflop-uk-classic-c1.html  
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.
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D8%AA%D8%A7%DB%8C%D9%84%D9%86%D8%AF-%D8%AF%DB%8C  
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.
URL: http://www.chaharfasl.net/%D8%AA%D9%88%D8%B1-%D8%AA%D8%B1%DA%A9%DB%8C%D9%87-%D8%AA%D8%A7%D8%A8%D8%B3%D8%AA%D8%A7%D9%86-96  
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!
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D9%85%D8%B4%D9%87%D8%AF-%D8%AF%DB%8C  
By: Buy PoE Items  
What if I had the guts to quit my job.
URL: http://runescape4account.com/u4gm-with-poe-items-in-cheap-price/  
By: cheap POE currency  
Leave me alone !
URL: http://pathofexile.bloog.pl/id,364482437,title,Path-of-exile-Published-Two-Abyss-Supporter-Packs,index.html  
By: cheap POE currency  
You're very professional.
URL: http://www.naijahotzone.com/blogs/post/42#sthash.3RF9ehVh.wH2Qgip2.dpbs  
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!
URL: http://chaharfasl.net/%D8%AA%D9%88%D8%B1-%D8%AA%D8%B1%DA%A9%DB%8C%D9%87-%D8%AF%DB%8C  
By: Final Fantasy XIV Gil  
Come on, Stop!
URL: http://www.destiny-service.com/final-fantasy-xiv-is-a-brand-new-gameplay-stormblood/  
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:
URL: http://www.adidasultraboosts.us.com  
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.
URL: http://www.air-max-2017.fr  
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??
URL: http://www.louis-vuittonoutlets.us  
By: buy NBA 2K17 MT  
I'll fix it!
URL: http://begamer.net/blogs/1577/6415/enjoy-fun-within-seconds-nba-2k1  
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."
URL: http://www.airmaxs-90.us  
By: fifa 17 ps4 coins  
No, I know.
URL: http://a6.pl/blogs/post/26861  
By: fifa coins  
The youre really talented .
URL: http://u4fifa.blogcu.com/u4fifa-is-a-professional-mediator-for-online-fifa-coins-selling/21120006  
By: buy albion gold  
Take my word .
URL: http://carpetarota.com/blogs/37355/144921/three-tips-help-you-make-money-in-albion  
By: u4fifa  
You 're so smart.
URL: http://u4fifa.flavors.me/  
By: cheapest fut 16 coins xbox 360  
Take my word .
URL: http://www.fifa16mall.com/fifa-16-coins/XBOX-360-2110  
By: Blade and Soul gold  
You did it !
URL: http://kcancer.com/content/how-best-using-your-soul-shields-blade-and-soul#comment-2040  
Your name:
Email:
URL:
Comments:
 

 -