.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Filtering Page contents by User's City

Posted By:      Posted Date: October 22, 2010    Points: 0   Category :SharePoint
I have set a profile column for WorkCity and would like to display news and weather specific to that user's home location no matter where he or she logs in.  I am doing this in SharePoint 2010 Standard and do not have Profile synchronization set up.  Is there any way to do this?

View Complete Post

More Related Resource Links

Building Re-Usable ASP.NET User Control and Page Libraries with VS 2008


I am having problems with a user control. I want my solution to have a separate project for holding my user controls.

The main project can get a reference to this user control project and can import this user control dll into my main project. 

Thanks in advance,

Dheeraj Mittal


Knowing the event occured in user control in current page




      My web application has user control which uses third party controls called Devexpress controls. The user control is a menu  and is part of the Master page. It is placed there because this needs to be available in all the pages. My user controls raises a even on item clicked. Now, My question is that Is there any way to know that the event has occurred in page_load of the current page in which I am in?

How to process data AFTER page is completely loaded for the user?


I have some logging that has to be done, which are some database update or inserts.

However this logging is of no importance to the user, so I only want to process the data/logs after the page is completed for the user.
As of now, if I process the data while the page is loading, I go from 1.4 to 2.0 speed (server side time processing of code), which is quite a bit comparing it is of no use to the user.

So I want this code only executed after that the page is complete.

I've been checking out Ajax, async pages etc, but the problem is it still gets executed before the page is rendered to the client, which means the client will have to wait longer then it is not being processed.

I've been checking out Threadpool.queueBackgroundWorker, however if I get it correct, this will still be executed before the page is shown to the user, as it has to complete before the prerender.

Then I thought about creating a new thread, and do the processing there, which would not have my page waiting to complete the data/logging.
However when I have 100 or 200 users loading pages at the same time, then that would mean I would be creating 200 threads on those loads, which I doubt will be good for performance. So if I want to solve this, I would have to create my own threadpool and only assign for example a max of 40 threads to it which can pr

Blank Managing My Links Page for Just One User



I've got a single user who's not able to manage his links in MOSS 2007. The links I speak of are gotting to via http://<<your:mysite>>/_layouts/myquicklinks.aspx. Other users have no issue.

I read somewhere that this might be caused by the user in question having added an improperly formated link. My issue is how can I check for that condition and correct it? Any thoughst would be much appreciated.





User Control not accessing the value of the properties send to it from the aspx page.


I have a dynamic accordion on a page. Set its datasource to an object of paged data source.The user control is in the accordions content template. When i was writing code the properties were showing but after giving the values of databases as


<uc:UserControl1  runat="server" Property1='<%#DataBinder.Eval(Container.DataItem,"columname1")%>' Property2='<%#DataBinder.Eval(Container.DataItem,"columname2")%>'  ></uc:UserControl1>


but the values shows null, these properties are shown as textboxes text property by user control.

MoreOver when I checked the values of database Items.So i made a textbox instead of usercontrol here as

<asp:TextBox ID="txtTest" runat="server" Text='<%#DataBinder.Eval(Container.DataItem,"Columname1")%>'></asp:TextBox>

It is showing the correct value. And if i pass the value directly it is also showing correctly like

<uc:UserControl1  runat="server" Property1="XYZ")%>' Property2="ABC")%>'  ></uc:UserControl1>

. where I am wrong

the problem is eval is not passing the value to usercont

How show the computer user into a label in a master page

  Hello all, I'm creating a web site and I have this question, I installed a label with the name Userlbl in the master page, and the idea that I have, is when somebody opens the website, the label shows the computer's user, in my case Welcome: "Charly_csh" I tried with this code, that I used before in access and it works, when I load the page on the localhost, but when I load on the server, it shows NETWORK SERVICE The code is this: Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Userlbl.Load Dim wshNetwork As Object 'New wshNetwork wshNetwork = CreateObject("WScript.Network") Me.Userlbl.Text = wshNetwork.UserName wshNetwork = Nothing End Sub Does somebody have an idea???       

Long execution times for Search pages even after 4th or 5th user has accessed the same page.

Hi Guys We have a Sharepoint 2010 farm with two NLB web fronts ends, a Index server and a two box SQL cluster. The same problem also occurs on a dev box which has Sharepoint 2010 and SQl server running on the same single box. When a user access the search or advanced search page we get long execution times of between 15 and 30 seconds.  The strange thing is that the user will have a slow response the first time, then they are fine for a period of an hour or two and then they hit the slow response again.  Below i have copied info from the developer dashboard.  Does anyone have a suggestion of where to start tackiling this issue. Thanks 1st Run.  (Note this site was accessed by 3 other users first) BeginRequestHandler (0.05 ms) PostAuthenticateRequestHandler (0.06 ms) PostResolveRequestCacheHandler (18.48 ms) GetWebPartPageContent (16.87 ms) GetFileAndMetaInfo (15.57 ms) GetWebPartPageContent (35.25 ms) GetFileAndMetaInfo (34.99 ms) GetWebPartPageContent#1 (89.27 ms) GetFileAndMetaInfo (89.06 ms) Add WebParts (3975.17 ms) Search Box (3974.54 ms) SearchBoxEx.OnLoad (15426.56 ms) SearchBoxEx.HandleContextualScoping (0.01 ms) UserPreference.GetUserPreference (15418.52 ms) UserPreference.GetFromCache (0.04 ms) SearchServiceApplicationProxy.GetUse

Customize the User Profile page

I need to add a "link" or "button" to the User Profile page (userdisp.aspx).  In SP2007, I had a custom feature that would forward the user to a custom aspx page, but that doesn't appear to work in 2010.  Is there a recommended method of customizing the User Profile page in 2010?

How to Create a Curriculum Vitae For every user on there profile page?

Hi, I have to create a Curriculum Vitae on everyones users profile page so they can fill it in and afterwards we can do searches on it to see the experience of our people. This has to be done in a webpart. All ideas are welcome... i have no idea how i need to start on this.. i was thinking of making a list and saving all data of everyuser in the list (but if i put a webpart on the profile page i guess i will only have 1 list for all users or not?). Or maybe creating a wiki with all the userprofiles and then a webpart that query's the wiki.. but will the search work then?   What would be the best sollution?  I'm working with sharepoint 2010 Enterprise Thanks a lot!!!   TIM

change contents of page based on choices

Hi,I am using AppCode and have 6 arrays of information I want to display on my web page. However I only want three to be visible at any one time. ________________________________ |                    |                       |                 | |                    |                       |                 | ________________________________      button             button            button i.e. a table like the above.   I have created the layout and the choice buttons etc I am using querystrings to pass the changes to the webpage.The problem comes however when trying to write the code for the table diplay. Now each has a slightly different layout.My initial thought was to write

Redirecting to custom page while clicking on the user/group browse button

Hi, i have created a custom visual web part in visual studio 2010 and i deployed it into sharepoint site by creating a new page in my site. The custom page gets the data of users/groups from database and pass the users to the people picker in sharepoint.Here my question i have a document library where we upload document and get the users page popup that consists of people picker and a user/group browse button.when i click on the (book image button)browse button it will redirect to the user and group search page but here i need to replace my custom  user/group search page with the default one so please help me how to redirect to the custom page by clicking on the user/group browse button,and i need to pass the selected users to the people picker text box........please give me some solution whether this can be done or not if possibe please send me the link or some sample code how to do this   thank you.

How to Access Parent Page (.aspx) control (IDs) from its child User Control (.ascx)

I have a parent .aspx page that has a asp:panel control in it, and this parent .aspx is also referencing a user control that I registered in that .aspx. Lets just call it usercontrolA.ascx for this post.The user control has a radiobuttonlist itself.Based on a selection from the radiotbuttonlist in the user control, I want to be able to hide the asp:panel in my .aspx (parent) but unfortunately I cant' get it to work:parentPanel.visible = true;  <<< I trried this in usercontrolA.ascx.csBut the user control doesn't know about the panel in the parent .aspxSo do I need to expose that somehow from the parent so that I can access it from the code behind of the child .ascx?  How?

how to redirect user to login page if session is null

i have 2 page,1.login.aspx ---  2.welcome.aspxin my login.aspx im storing username into sesssion as below:Session["usernm"] = txtUsername.Text;in my welcome.aspx  pagein page_load event if (Session["usernm"]==null)        {            Response.Redirect("Login.aspx");        }----- here if i manulally paste the url ( http://localhost:4125/Loginado/welcome.aspx) it should go to  login.aspx for user credentialsbut its going directly to welcome.aspx  page.

Filtering the Table of Contents Web Part

Hi there, I'm trying to filter the Table of Contents web part so that it only shows a list of sites; excluding the documents, lists, discussions, etc... This is on our projects site, and will be used to show a list of projects. I've scoured the net for quite some time and found some people trying to do the same kind of thing, but couldn't seem to get their custom xsl template to do the trick. I'm by no means an xslt expert, but I believe the answer lies in adding a custom style template that will filter the resultset in the LevelStyle.xsl file? Please help!!!

How do I allow some .net pages to be used from a login page before the user is authenticated?

Ok, I have a .net homepage (viewable and useable to everyone) which is "login.aspx".  There is a header with a menu and three columns under that.  The header has a "home" button which will display a page (standings.aspx) with data from a gridview control which gets its data from an access db in a directory called Access_DB from the root level of the site. The next menu in the header is "Schedules", which uses the same db and a set of .aspx files (i.g. MondaySched.aspx, ThursdaySched.aspx, etc) to populate NFL schedules in various formats, and the last column "About" is just some html files.  All of this data is placed in an IFRAME in the middle column of the page.  The left column is where the login textboxes/submit button reside, the last column is just some html.I am using form level authentication as follows:<authentication mode="forms"><forms name="BTGAppSec" loginUrl="login.aspx" protection="All" timeout="30" path="/" /></authentication><authorization><deny users="?" /></authorization>The problem is when you go to the site and it tries to load the "standings.aspx" into the IFRAME on page load, it sees that as an unauthorized user and sends the IFRAME back to login.aspx.  So what you get is a &qu

Accessing User Control that is in a Master Page

I have looked everywhere for how to do this and all I come up with is threads describing how to expose public properties.  I have a USER CONTROL in my  Master page. It is a search box with a text box and a dropdown for search type (last name, account number, etc) and a search button.  When the user clicks the search button, I open a new page that displays the results.  How do I pass the values from the USER CONTROL search fields to the new page?  I would post code, but I have nothing to post yet since I don't know where to start. I have tried exposing the public property of the user control, but I don't know how to retrieve those values on the results page.  Anyone have any sample code on how this is done? Thank you in advance for your help!

Accessing a public property of a nested user control in a master page from a pages' user control

Hi  I've got a web site that has a master page and that master page (mpMaster that has a user control (ucControl1) which has a sub user control (ucControl2), this user control has a property which accepts a value. Now, I have a page that uses the master page and on this page I have another user control (ucPageControl), I need to  find a way of setting the value in ucControl2 from ucPageControl. Is this possible at all? Many thanks Ed
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend