Posts

Showing posts from August, 2014

How to add an active class in navigation menu item in asp.net website?

How to add an active class in navigation menu item in asp.net website? Generally active class show which page /link you are visiting currently. Active class will be added in css class, but the problem is only one item can have active class at one time. But we need to show active class dynamically.

how to do url rewrite in C#.net. implemented in asp.net4.0 version

how to do url rewrite in C#.net. implemented in asp.net4.0 version

Url rewriting is just to display a friendly and readable url instead of a comlex or unfriendly url.

Suppose there is a url in your website just like below:

http://sharepointcafe.net/Page.aspx?userid=23456

The disadvantages of above mentioned url are:

1. This is not a friendly url.
2. The url does nt looks descent.
3. Last but the major thing is this url is not readable by Google and other search engine.

So, if your website contains url like above then there is no meaning of your content of that page because it will not be indexed by google.

So, how can it be avoid and how it can be re write in a seo friendly and readable url.

In asp.net 3.0 it was not an easy task to complete. But in asp.net4.0 it is very easy.

I am explaining this for asp.net 4.0 version.

First add a Global.asax file in your project.

Add the reference of System.Web.Routing in your project.
And then add this <%@ Import Namespace="System.Web.Ro…

Three tier architecture in ASP.Net using C# code

Image
Read my other blogs, C# 6.0 new features, ASP.Net Tutorial and .Net Core Tutorial.
In this blog, we will see 3-tier architecture to develop an application in C#.

How to send email to a user using workflow in SharePoint2010

How to send email to a user using workflow in SharePoint2010

Suppose there is a scenario that when ever you add a new item to a list in SharePoint site immediately an email should be sent to a specific member or user.
Here I will explain this scenario by using SharePoint designer 2010.
Please follow below steps:
1. Open SharePoint site in SharePoint designer. 2. File-New-Workflow  3. Once the dialog box opened then Enter the name of workflow and then select sharepoint list or library on which you want your workflow to be execute. and click Next. 5. Dont forget to select workflow start option, i.e. whether you want it to be started automatically or manually. 5. From Actions select send an Email. 6. Now click on this message, in the action that appears now. 7. Now in the new dialog box, enter the user email id in To box. 8. Then type a subject in subject box. 9. Now click OK.
Now, you can test your workflow by adding an item in list.