asp.net
Next month, the TechDays edition 2012 (14-15-16 february) will take place in Belgium. The last three years, the event passed in Antwerp, but now they are moving to a new location. Kinepolis Imagibraine in Braine l'Alleud (Eigenbrakel).The location isn't that important.The hard thing will be, to pick out the most interesting sessions, because there any many sessions in the same time-blocks. Here is a list of some sessions, i'll certainly attend:Introducing Windows Runtime in Windows 8What's new in ......
I remember myself a tweet from Scott Hanselman a couple of months ago, where he asked us to check out a small application he wrote. As one of the first testers of his new "thing", I was interested but there were no documentation or libs available yet. A couple of days a go, I read a blogpost from Maarten Balliauw about SignalR. (Maarten's blog). Because I allready heard about SignalR a couple of months ago, I had to develop a very small application to test how it really works. 1. Install SignalR ......
To add a new role into my aspnet database, I tried to use the asp.net Web Application Administration Website. But it was showing the following error message:An error was encountered. Please return to the previous page and try again. Strange, because I was sure, that my connectionstring was correct.After a while, after reading about the asp.net Web Application Administration Website, I found that it can't handle spaces or special character in the project path.My project was located in C:\Users\JEROEN\Documents\V... ......
When a user post's data to the server, the page will be reloaded. When the user hits the F5/refresh button, a message appears, which tells us, that we´ve allready sended the data to the server. And asks us if we want to sent it again. If the user clicks "yes", we have to catch that, we don´t want this in our application - check that the user can only post something every 2 minutes. - save the posted data in viewstate and check if something changed - ... Or we can check if the user hit the refresh ......
Last, I needed a function to add paging. The first problem I had, was how to this. A couple of seconds later, I allready had a solution to this problem: Linq Skip and take will do the trick. list<t>.Skip(_howMany... This won't crash if you pass one of both statements. It will just return the result. source.Skip(startRowIndex).... I've created an extension method to use this function. VB Module LinqHelpers <System.Runtime.Compiler... ......
If you want to consume a webservice, it's not allways necessary to do a postback. It's even not that hard! 1. Webservice You have to add the scriptservice attribute to the webservice. [System.Web.Script.Services... class PersonsInCompany : System.Web.Services.WebService { Create a WebMethod [WebMethod] public Person GetPersonByFirstName(string name) { List<Person> personSelect = persons.Where(p => p.FirstName.ToLower().Start... if (personSelect.Count ......
A couple of years ago, I used 'something' to encrypt the connectionstring on a production server. But I never wrote anything down about it. And in the other projects I did later, I never had deploy to the production server. Yesterday, I had to use it again but I couldn't find it. Why? Because I never wrote about it. This blogpost is copy of Chirag Darji post about the encryption of the connectionstring in web.config. All credits to him! The most sensitive information stored in web.config file can ......
Long time no see. For example you want to sent an automatic email in ASP.NET. But your culture is "en-GB" and the language of the person you want to email is Spanish("es-ES"). Then you want to use the Spanish resource files, while creating the mailMessage. You can use the Spanish resource file by using the HttpContext.GetGlobalResour... method. Dim sLabel As String = HttpContext.GetGlobalResour... "myKey", New CultureInfo("es-ES")) More information: http://msdn.microsoft.com/e... ......
If you have a website with many languages, you don't want to edit the resource files every time the client asks for a change. So you can create an application, where you or your client can edit the resource files. First you have to read all the resource files into your database. For this, you need the ResXResourceReader. Dim resXFileRead As String = "D:\\vs2008\\test\\ResxFile... reader As New ResXResourceReader(resXFile... For Each d As DictionaryEntry In reader Response.Write("Key: ......
Full asp.net Archive