When you have decided to create a website for your business or say you are a developer and designing a website for your customer, you should always keep in mind that the Web site structure should not be complicated. A website should be well-organized, a well-organized website is one which is easy to understand, navigate and find easily what the visitor is looking for.
The intensionof the article is to make you understand the level of leaves/pages of the website should reside in. A good well organized website makes it easy for you to grow your site logically.
The page (which has the content) of your website must not be more than two level in the depth, that is the required page should not take more than two clicks from the home page. This is very important with regards to Search Engines.
A typical website structure could be as in the picture below.
Tier 1 – The home page
Tier 2 – The team sites/folders/sub sites
Tier 3 – The leaves/pages with contents
References
website structure
website structure
website structure
Hope this helps.
Thursday, July 30, 2009
Wednesday, July 29, 2009
SQL Reporting on Microsoft Sharepoint.
Guys, the listed links are very helpful in reporting on sharepoint lists. Reporting on sharepoint list is not that simple as you do with any of the database. It requires specialized skills and creativity. If you can think then you may discover a new method as well.
Click here
Here
and here
You can do query the data from two different lists like you do with tables but then you need a third party tool like Enyses RS Extension.
Hope this helps!!
Click here
Here
and here
You can do query the data from two different lists like you do with tables but then you need a third party tool like Enyses RS Extension.
Hope this helps!!
How to pull Active Directory Users and populate into a drop down.
Sometimes it is very hard to get it done, use this code to pull all the users from your active directory.
private void populateUsers()
{
ddlUsers.Items.Clear();
using (HostingEnvironment.Impersonate()) // To break the security for some time
{
DirectoryEntry entry = new DirectoryEntry("your AD server name");
DirectorySearcher searcher = new DirectorySearcher(entry);
try
{
searcher.Filter = " (&(objectClass=user)(objectCategory=person)(DN=*) "; //DN is the distinguished name of the AD user
foreach (SearchResult sResultSet in searcher.FindAll())
{
ListItem item = new ListItem();
item.Text = GetProperty(sResultSet, "givenName") + SPACE + GetProperty(sResultSet, "sn"); // sn - Surname
item.Value = "your domain" + GetProperty(sResultSet, "sAMAccountName"); // sAMAccountName - login name
ddlUsers.Items.Add(item);
}
ddlUsers.Items.Insert(0, "Select User");
}
catch (Exception ex)
{
throw new AppException(ex);
}
}
}
public static string GetProperty(SearchResult searchResult, string PropertyName)
{
if (searchResult.Properties.Contains(PropertyName))
{
return searchResult.Properties[PropertyName][0].ToString();
}
else
{
return string.Empty;
}
}
Hope this helps!!
private void populateUsers()
{
ddlUsers.Items.Clear();
using (HostingEnvironment.Impersonate()) // To break the security for some time
{
DirectoryEntry entry = new DirectoryEntry("your AD server name");
DirectorySearcher searcher = new DirectorySearcher(entry);
try
{
searcher.Filter = " (&(objectClass=user)(objectCategory=person)(DN=*) "; //DN is the distinguished name of the AD user
foreach (SearchResult sResultSet in searcher.FindAll())
{
ListItem item = new ListItem();
item.Text = GetProperty(sResultSet, "givenName") + SPACE + GetProperty(sResultSet, "sn"); // sn - Surname
item.Value = "your domain" + GetProperty(sResultSet, "sAMAccountName"); // sAMAccountName - login name
ddlUsers.Items.Add(item);
}
ddlUsers.Items.Insert(0, "Select User");
}
catch (Exception ex)
{
throw new AppException(ex);
}
}
}
public static string GetProperty(SearchResult searchResult, string PropertyName)
{
if (searchResult.Properties.Contains(PropertyName))
{
return searchResult.Properties[PropertyName][0].ToString();
}
else
{
return string.Empty;
}
}
Hope this helps!!
Tuesday, July 28, 2009
Custom webpart development using ASP .NET.
There are many references found on the web for custom webpart development, some of which I am adding here, if you want any specific functinality then let me know.
http://www.codeguru.com/csharp/.net/net_asp/webforms/article.php/c12293/
http://www.datasprings.com/Resources/ArticlesInformation/Sharepoint2007CustomWebParts/tabid/775/language/en-US/Default.aspx
http://msdn.microsoft.com/en-us/library/ms452873.aspx
Hope this helps!!
Thanks.
http://www.codeguru.com/csharp/.net/net_asp/webforms/article.php/c12293/
http://www.datasprings.com/Resources/ArticlesInformation/Sharepoint2007CustomWebParts/tabid/775/language/en-US/Default.aspx
http://msdn.microsoft.com/en-us/library/ms452873.aspx
Hope this helps!!
Thanks.
How to sort a drop down list in C#.
There is no built in method available to sort a dropdown or any list in C#, thought to share with you guys.
#region SortDropDownList
public void SortDropDownList(DropDownList ddl)
{
//create a ListItem array the size of the items
//in your DropDownList
ListItem[] sorted = new ListItem[ddl.Items.Count];
//loop through all the items in your ListItem array
for (int i = 0; i < sorted.Length; i++)
{
//resize the array on each iteration
Array.Resize(ref sorted, i);
//add the current index to the array
sorted[i] = ddl.Items[i];
}
//call Array.Sort to sort your ListItem array
Array.Sort(sorted);
//remove all items from the DropDownList
ddl.Items.Clear();
//add the sorted items to the DropDownList
ddl.Items.AddRange(sorted);
}
#endregion
#region SortDropDownList
public void SortDropDownList(DropDownList ddl)
{
//create a ListItem array the size of the items
//in your DropDownList
ListItem[] sorted = new ListItem[ddl.Items.Count];
//loop through all the items in your ListItem array
for (int i = 0; i < sorted.Length; i++)
{
//resize the array on each iteration
Array.Resize(ref sorted, i);
//add the current index to the array
sorted[i] = ddl.Items[i];
}
//call Array.Sort to sort your ListItem array
Array.Sort(sorted);
//remove all items from the DropDownList
ddl.Items.Clear();
//add the sorted items to the DropDownList
ddl.Items.AddRange(sorted);
}
#endregion
Monday, July 27, 2009
text with rotation displayed with no effect in crystal reports.
Problem
Text with rotation have no effect on DHTML viewer.
Resolution
1. locate default.css from C:\Program Files\Business Objects\common\3.5\crystalreportviewers115\css\
2.Add the vertical text entry to the CSS file and save
.verticalText
{
writing-mode: tb-rl;
}
3. Specify the vertical text tag in your report by right clicking on the field that you want vertical, selecting properties, and under the “common” tab, enter “verticalText” in the “CSS Class Name” field.
Hope this helps.
Thanks.
Text with rotation have no effect on DHTML viewer.
Resolution
1. locate default.css from C:\Program Files\Business Objects\common\3.5\crystalreportviewers115\css\
2.Add the vertical text entry to the CSS file and save
.verticalText
{
writing-mode: tb-rl;
}
3. Specify the vertical text tag in your report by right clicking on the field that you want vertical, selecting properties, and under the “common” tab, enter “verticalText” in the “CSS Class Name” field.
Hope this helps.
Thanks.
Images/Charts not displayed on view but fine when exported.
Symptom
Charts/Images on crystal report are not dispalyed when viewed from viewer, but when you export it to any of the format for example "pdf", there you will find your charts/images. I have found a work around for this.
Resolution
1. Right-click My Computer and click Manage.
2. Navigate to Services and Applications > Internet Information Services (IIS) Manager > Web Sites > Default Web Site.
3. Right-click crystalreportviewers115 and then click Properties.
4. On the ASP.NET tab, choose a 2.0.x version from the ASP.NET Version list.
5. Click the Apply button and then click OK.
6. Right-click businessobjects and click Properties.
7. On the Virtual Directory tab, click the Configuration button.
8. Check the path of the mappings and note the version number (in the path ...\Framework\vX.X...)
9. Repeat steps 2 to 5 for crystalreportsviewers115.If the paths for businessobjects and crystalreportviewers115 are different, change one or the other so that they point to the same version of .NET Framework.
10. Stop and restart the Default Web Site.
Hope this helps
Thanks.
Charts/Images on crystal report are not dispalyed when viewed from viewer, but when you export it to any of the format for example "pdf", there you will find your charts/images. I have found a work around for this.
Resolution
1. Right-click My Computer and click Manage.
2. Navigate to Services and Applications > Internet Information Services (IIS) Manager > Web Sites > Default Web Site.
3. Right-click crystalreportviewers115 and then click Properties.
4. On the ASP.NET tab, choose a 2.0.x version from the ASP.NET Version list.
5. Click the Apply button and then click OK.
6. Right-click businessobjects and click Properties.
7. On the Virtual Directory tab, click the Configuration button.
8. Check the path of the mappings and note the version number (in the path ...\Framework\vX.X...)
9. Repeat steps 2 to 5 for crystalreportsviewers115.If the paths for businessobjects and crystalreportviewers115 are different, change one or the other so that they point to the same version of .NET Framework.
10. Stop and restart the Default Web Site.
Hope this helps
Thanks.
How to pass the logged in user name to the store procedure or query in Crystal Reports.
Crystal Report has this lilmitation that you cannot use or pass the Crystal Special fields to the stored procedure or command object as a parameter, say if you want to retrieve the data of the current logged in user as
Select * from tUser where user_id = CurrentCEUserName
CurrentCEUserName is the crystal special field. To achieve the above thing, please follow the following steps.
1) Create a blank report, suppress all the sections except the report footer.
2) Add a formula field and place the special field CurrentCEUserName in the formula.
3) Create a subreport in the and place in the report footer.
4) Create the command with parameter UserId in the subreport.
5) From main report link the formula field created with the subreports command parameter.This way the Current CE User Name will be available in the subreport which is actually our main report.
Hope this helps,
Thanks.
Select * from tUser where user_id = CurrentCEUserName
CurrentCEUserName is the crystal special field. To achieve the above thing, please follow the following steps.
1) Create a blank report, suppress all the sections except the report footer.
2) Add a formula field and place the special field CurrentCEUserName in the formula.
3) Create a subreport in the and place in the report footer.
4) Create the command with parameter UserId in the subreport.
5) From main report link the formula field created with the subreports command parameter.This way the Current CE User Name will be available in the subreport which is actually our main report.
Hope this helps,
Thanks.
Navigate to portal home from Mysite.
We had this problem of having Portal home link (to return to the portal home page) on Mysite of every user during one of our project, what we did was we created a link in SharedServices1 > Personalization site links.
Easy enough to add a link in SharedServices1 > Personalization site links. Except that when you click and return to your Portal, the menu has retained the MySite navigation because the URL contains "?MySiteView=1".The solution (as per link) is to add a # on the end of the URL you enter, this makes the rest of the link an anchor so SP will ignore it and display your normal menu. Thought to share it with you guys.
http://portalhome/#
Thanks.
Easy enough to add a link in SharedServices1 > Personalization site links. Except that when you click and return to your Portal, the menu has retained the MySite navigation because the URL contains "?MySiteView=1".The solution (as per link) is to add a # on the end of the URL you enter, this makes the rest of the link an anchor so SP will ignore it and display your normal menu. Thought to share it with you guys.
http://portalhome/#
Thanks.
Subscribe to:
Posts (Atom)