ASP.Net
50 posts in this category
- Design Patterns(C#): Basic example Strategy patternIn this example I´m going to explane the strategy pattern. With this example you can do a calculation with two numbers /+ and expand the number of operators…Nov 24, 20102 min read
- Asp.Net: Webtest trough proxy (WebTestPlugin)The test team came to me with a problem involving connection errors while running webtests trough the company proxy. The webrequest needed to go to the…Oct 24, 20102 min read
- Asp.Net: keyboard sort itemsAs proof of concept I wanted to sort images in a Grid by keyboard. The sort logic needed to be implemented on the server. My solution for this problem is a…Sep 24, 20101 min read
- C#: Get Parent Control with GenericsI use the following method to return a parent control of a specific type. This method is recursive and uses generics.Apr 27, 20101 min read
- MemoryStream to Byte Array (Byte[])With the following code you can convert your MemoryStream to a Byte Array.Apr 19, 20101 min read
- C#: Remove line from textfileWith the following code you can remove a line from a textfile web.config . If the string is within a line the line will be removed.Jan 26, 20101 min read
- Asp.Net: DataPager problem with ListviewWhen using the Datapager with a ListView I had the following problem. When clicking a paging button for the first time nothing happens.But when I click a…Dec 23, 20091 min read
- TypeMock: Mock Unittest examplesIn this example I will show how to create a Unit Test with TypeMock. First I have created some basic dummy classes for the example With the following Unit…Oct 21, 20093 min read
- Asp.net: DateTime Eval String formattingWith the following code you can format a DateTime within a Databind.Sep 24, 20091 min read
- Asp.Net: invoke WCF method with WCF Test ClientWhen deploying a Silverlight application we ran into problems a WCF web service, to find out what the problem was I wanted to invoke the method. Microsoft…Aug 20, 20091 min read
- LINQ: Creating a if statement in Linq queryA lot of times I need to check a statement within my LINQ query and I wish there was a possibility of a IF statement within LINQ. The following code is the…Jul 30, 20092 min read
- Linq to Xml: Generate Google Sitemap with sitemap-protocolIn this example I will generate a XML site map that complies with the sitemap protocol XML schema. This example will give the following output: To keep the…Jul 8, 20091 min read
- Add meta data (keywords, description) dynamicallyAdd meta data dynamically to your page by adding a HtmlMeta control to your Header. In this example I dynamically add a keyword string to the page. You can…Jul 6, 20091 min read
- Set CultureCode for RDLC (SQL reporting report)You can set the culture of a report by clicking the report and setting the Language property. If you want to support multiple cultures you can set the…Jun 11, 20091 min read
- Using the ViewState within the SelectMethod of a ObjectDataSourceBy default it is not possible to use the ViewState within methods of a ObjectDataSource. Because the DataSource doesn't run within the current page instance,…Jun 3, 20091 min read
- Updated some blog postsI update two posts: String formatting in C Copied the source of the post to my own blog as backup. DBML read connection string from web.config Added an…May 20, 20091 min read
- WCF webservice error with DBML objectsWhen deploying a WCF webservice for a Silverligh application I got the following error: As you can see from the error you need to add the \ Serializable\…May 7, 20091 min read
- Asp.Net: Clear inputfields after form submitEvery time a form is successful summited I need to clear all input fields to the default values and give feedback to the user. I wrote a method ClearControl…Apr 15, 20091 min read
- Asp.net: Sort generic list with a delegate.You can use a delegate to sort a generic list. ExampleApr 10, 20091 min read
- Sitecore: itemlist with ObjectDataSource, Listview and DataPagerFor a new project I started working with Sitecore again. I needed to create a listing of items with paging. I implemented a Listview with a ObjectDataSource…Apr 8, 20091 min read
- Asp.Net: Caching Rss feedsFor dotNetSearch.net I needed to cache the RSS feed on the right . I did this with the .Net Cache namespace. In this examle I add the RSSFeed content as…Mar 3, 20091 min read
- Asp.Net: Charting Control (Error ChartImg.axd)After installing and playing with the Asp.Net Charting control I decided to use it for a customer. When integrating the control to the project I got the…Mar 3, 20091 min read
- SQLReporting service: DeploymentWhen deploying a project to a internal test server I got the following error: The definition of the report 'Main Report' is invalid. An unexpected error…Mar 3, 20091 min read
- Asp.Net: Menu control remove MenuItem (MenuItemDataBound)For a project I needed to remove menu items to the pages in the folder 'Subscriberpages' when a the user is in the Role of 'Marketing' and…Feb 26, 20091 min read
- Asp.Net: Method to get week number (getweekofyear)This method return the integer weeknumber of a specific date. More info: http://msdn.microsoft.com/en…Feb 21, 20091 min read
- Asp.Net: Using the OnCommand Event with CommandArgumentWhen using a button, linkbutton or imagebutton with CommandArguments or CommandName you can use the OnCommand event instead of the OnClick event. Using the…Feb 4, 20091 min read
- Asp.Net: Databinding a array of stringsYou can use a string array as datasource and view the string values by using the Container.DataItem property. Code example Codebehind: \ code:c \ string\ \…Jan 30, 20091 min read
- Asp.Net : Setting the DefaultButton for the LoginControlYou can set the DefaultButton property of the Login control by putting the Login control in a Panel and set the DefaultButton property of the panel to the…Jan 22, 20091 min read
- Linq to Sql: Retrieve properties from related data (LoadWith)You have to specify which related data you want to retrieve from a object so you can access them outside the Linq data context. You can achieve this by using…Jan 15, 20091 min read
- Regex: Check Asp.Net Membership is valid.The following RegularExporessionValidator checks if the text input is correct format for a user name.Jan 14, 20091 min read
- Membership: Update Password MembershipUser (ChangePassword)You can change the password of a MembershipUser object in C with the ChangePassword method. The only problem of this method is that it needs the old password…Jan 13, 20091 min read
- Some tips for the Asp.net dropdown controlI always have problems implementing the Asp.Net dropdown control. Here are some simple tips to make your life with dropdown controls easier. Adding an…Dec 30, 20081 min read
- Asp.Net Membership: Set url to the login pageThe loginstatus control doesn't have a property to set the url of the login page. You need to set this URL in the web.config of your application. Insert the…Dec 4, 20081 min read
- Run website on IIS7 (Vista) in classic modeIf you run your website on IIS7 you can run into the following HTTP errors: 500.22, 500.23 If you don't want to change your web.config and still want to run…Dec 3, 20081 min read
- Load rss (xml) with Linq to XML on medium trust hostingFor a new project I needed to implement show data from RSS. The site will be hosted on a shared hosting environment with medium trust. I load the rss with…Nov 26, 20081 min read
- Rabobank starterscommunity liveThis week we launched the Rabostarterscommunity. This community is built with Telligent Community Server 2008 and SiteCore 5. For reporting we uses Harvest…Sep 24, 20081 min read
- Linq to Sql: Change connectionstring to load from Web.configUpdate 20 may 2009: New easy solution Set the Connection > Application Settings property True. This will generate a connection string in your app.config.…Sep 2, 20081 min read
- Bitmap Extension Methods; for Resize, Crop and saveFor Bitmap manipulation I wrote three extension methods. With this method you can resize, crop and save as jpg your image. Resize Method \ code:c \ public…Jul 24, 20082 min read
- ListView: OnItemDataBoundGet dataItem onItemDataBound don't forget to replace the bold parts with your objectname : \ code:c \ protected void MainPostListView\ ItemDataBound object…Jul 23, 20081 min read
- String.Format with C#In this post I will add examples of String.Format or links to sites with good examples. Double \ code:c \ </p> <p> //&nbsp;just two decimal places<br />…Jul 10, 20083 min read
- convert UnixTime to DateTimeIn an RSS feed I only had an UnixTime. For presentation I needed to convert this string to datetime. I did this with this code \ code:c \ DateTime…Jul 4, 20081 min read
- Regular Expressions and MatchhandlersFor a project I need to get the email addresses out of a string with all kinds of text in it. After a lot of trying I found the matchhandler method. It is…Jun 26, 20081 min read
- String Extension Method: IsGuid()I wrote an extension method for the string type. With this method you can check if an string is an Guid. The method returns a Bool. \ code:c \ public static…Jun 23, 20081 min read
- Using Session with a Web Handler File (ashx)In on of our project we use ASHX file to dynamicly generate stylesheets depending on the user. An problem occurred when the userdata was loaded from the…Jun 11, 20081 min read
- 101 Linq samplesWhen learning and working with Linq. I had the need of reference samples. When searching for an example of the select syntax I stumbled on the following site…Apr 1, 20081 min read
- Dynamic load whereparameters for linqDatasourceWhen using an Linq Datasource linq to sql for a datagrid Gridview, ListView, etc you don't always want all rows from a table. To exclute data you can use the…Apr 1, 20081 min read
- Use methods from masterpage in aspxIf you want to use methods from your masterpage add the following code in the .aspx file content page :Feb 7, 20081 min read
- Using Google Custom Search Engine (CSE) with Asp .NetI’ve been using Google Custom Search Engine CSE for one of my projects searchTravelBlog . When I was trying to implement CSE in NewGuid.NET I found some…Jan 12, 20082 min read
- obout Suite for .Net 2.0When surfing around I found this great range ASP.Net controls. Obout.com offers a great variety of ASP and ASP .Net controls. The controls are Cross Browser…Jan 11, 20081 min read
- Visual Studio 2008 releasedSince a few days the newest version of Visual Studio has been released together with the new 3.5 .Net framework. It contains tons of new features such as:…Oct 25, 20071 min read