Tag | ASP.NET Posts

Web Camps are a free event where you can learn about building websites using ASP.NET MVC.  More info at www.webcamps.ms

Register now as space is limitted:
https://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-CA&EventID=1032473173

 

The code samples in Microsoft All-In-One Code Framework are updated on 2011-1-23. Download address: http://1code.codeplex.com/r... You can download individual code samples or browse code samples grouped by technology inthe updated code sample index. If it’s the first time that you hear about Microsoft All-In-One Code Framework, please read this Microsoft News Center article http://www.microsoft.com/pr... or watch the ...
Few months ago I wrote an example about Dynamically Adding TextBox Control to ASPNET Table. As a recap that example demonstrate how to generate rows of TextBoxes in a Table control based on the number of rows and number of columns provided and as well as print the values entered by the user using the Request.Forms collections.. Recently,one of the user is asking if how are we going to accomplish the same thing by generating the TextBox in the Table based on the data from the database. So in this ...
Few months ago I have posted an article on how to use the ProudMonkey customized MessageBox, ConfirmBox and FrameBox controls for ASP.NET 3.5 here. Many developers are asking me via email and private messages requesting how to use those controls in ASP.NET 4.0. Obviously the previous dll will not work in ASP.NET 4.0 version because those controls are using AjaxControlToolkit 3.0.1106.0 which is not compatible with .NEt 4.0 version. So if you want to use the MessageBox, ConfirmBox and FrameBox controls ...
In this Issue: Bart Czernicki, Rich Griffin, Andrew Tokeley, WindowsPhoneGeek, Daniel Egan, Beth Massi, Joost van Schaik, Michael Crump, Xpert360, Deborah Kurata(-2-). Above the Fold: Silverlight: "Silverlight 4 – Simple Configuration Manager" Andrew Tokeley WP7: "WP7 Contrib – Customising the DateTime Picker" Rich Griffin Lightswitch: "Tips and Tricks on Controlling Screen Layouts in Visual Studio LightSwitch" Beth Massi Shoutouts: Scott Guthrie is doing another online LIDNUG session tomorrow, Jan ...
I have seen several posts on how to use the ASP.Net chart controls with MVC and they all involved some sort of hybrid web forms approach. I have a simple solution which is 100% MVC. Here is a summary of the process: Create an action to render the chart. Create an action to render the image map. Use a normal IMG tag to render the chart image. Use Html.RenderAction to render the image map. The most simple implementation without drill-down would look something like this: public ActionResult Chart(int? ...
For those that have not yet heard, NuGet went v1 recently along with a whole slew of tools from the Microsoft folks. I’ve been lucky to be a part of the NuGet project and see it take shape over the past few months with community input and contributions. Even though v1.0 was released, we are already moving forward with getting ideas and prioritizing features for the next version. To follow the announcement, UppercuT (UC) v1.2 now includes support for NuGet out of the box. Plus, it will handle versioning ...
2011 Event Recap Event Overview During the weekend of January 14th through January 16th, the St. Louis area technology community participated in a national GiveCamp event. With Microsoft’s assistance, similar events were held simultaneously in the following cities: Austin, Texas Phoenix, Arizona Birmingham, Alabama Colorado Springs, Colorado Dallas, Texas Atlanta, Georgia Houston, Texas Nashville, Tennessee Dallas, Pennsylvania Fayetteville, Arkansas New York City, New York Malvern, Pennsylvania ...
I was playing around with CSS and ASP.NET AJAX Modal Popup Control and wanted to have a popup that has a rounded corner outer shadows on it without using images. After searching the web for an existing solution I found this link and tried to apply it on my modal. Luckily I was able to make it work. Here's the whole code for my experiment: 1: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml... 2: <%@ Register Assembly="AjaxControlToolkit" ...
In my previous post I have demonstrated how to upload an image to a folder and display the image after uploading here. In this post I will extend a little bit of what I have demonstrated on my previous post. Basically I'm going to demonstrate how to display all the uploaded images from the folder in the web page on click of the Button. Here's the html mark up: ASPX: 1: <asp:FileUpload ID="FileUpload1" runat="server" /> 2: <asp:Button ID="Button1" runat="server" Text="Upload" onclick="Button1_Click" ...
I’m trying to find time to update the Prairie Developer Conference 2011 website, and the sessions and speaker information will be up by this weekend including the registration page. For those that are wondering what the session and speaker list looks like, I wanted to give a sneak peak. We have a fantastic set of sessions by world class technologists! We’re covering .NET, Java, Ruby, SQL Server, Agile, User Experience, Mobile, Security, Azure, Office, SharePoint, and others. In fact, this year I’ve ...
I wrote a series of blog posts awhile back before that demonstrates the following: Uploading and Storing Images to Database in ASP.NET Displaying Image to Image Control based on User Selection in ASP.NET FAQ: Displaying Image from Database to GridView Control Uploading and Storing Image Path to Database and Image to Folder - Part 1 Uploading and Storing Image Path to Database and Image to Folder - Part 2 (Displaying of Images) Validate Image extensions upon Upload In this post I'm going to demonstrate ...
I read a blog post a few months back about client binding your Asp.Net GridView. It was Called Bind Gridview using Jquery. I took it to heart and now I'm using it, except it doesn't handle client sorting (paging is another story). Granted this has some room for improvement and my js isn't the best… Base Page method with the grid view: protected void SetHeaderAttribs(GridView grid) { for (int i = 0; i < grid.Columns.Count; i++) { TableCell cell = grid.HeaderRow.Cells[i]; DataControlField field ...
Estoy utilizando la librería de Report.NET para crear archivos PDF. En el ambiente de desarrollo (como siempre) todo funcionaba bien. Es al publicar la aplicación en el servidor cuando comenzaron los problemas. El error: Se denegó el acceso a la clave de Registro 'HKEY_CLASSES_ROOT\AcroExch... Tras actualizar todo lo actualizable en el servidor sin resultado alguno, fue momento de buscar alguna otra solución. No me llevó mucho tiempo el encontrar la explicación en internet: ...
Tips and Tricks: ASP.NET AJAX 1.0 and User Controls Tips and Tricks: ASP.NET AJAX 1.0 and User Controls THANKS TO Bilal Haidar http://aspalliance.com/1274... ...
A VSIX file enables us to install Visual Studio extensions (tools, controls, template etc) with few clicks. I have created a simple example of creating multi-project templates with wizard using Visual Studio 2010, which generates VSIX file. Checkout the sample in codeplex here ...
I would like to share a few points with regards to encrypting web configuration sections in .Net 4.0. This information is also applicable to .Net 3.5 and 2.0. Two methods can work perfectly for encrypting connection strings in a Web project configuration file: 1-Do It All Yourself! In this approach, helper functions for encrypting/decrypting configuration file content are implemented. Program would explicitly retrieve appropriate content from configuration file then decrypt it appropriately. Disadvantages ...
This is just a note to myself on how to Encrypt and Decrypt App.Config (or Web.Config if ASP.NET) in a Windows Application. Encryption: 1. Rename App.Config to Web.Config 2. %windir%\Microsoft.NET\Fram... -pef "connectionStrings" <Full Path to Web.Config> 3. Succeeded! implies Encryption was successful 4. Rename Web.Config to App.Config Descryption: 1. Rename App.Config to Web.Config 2. %windir%\Microsoft.NET\Fram... -pdf "connectionStrings" ...
Silverlight is a great product right off the shelf. I use it, love it and spend a lot of time helping the community understand it. This however, doesn’t mean that I don’t think that it can get better. If I were invited to a Microsoft Focus Group about Silverlight here is 10 things I would say: We need more navigation templates. I’ve found (4) templates that Microsoft has released (Cosmo, Windows 7, Accent and JetPack). This number needs to be around 16. In order to get more people developing for ...
I was trying to install a new WSS v3 Sharepoint on a 64 bit Windows 2003 server today but the installation was giving some error saying i would need to allow ASP.NET 2.0 in the web server extension in IIS. Looking at the IIS there was a ASP.NET 2.0 32 bit allowed but not for a 64 bit. I tried registering the aspnet_regiis but no luck by doing so: For the 32 bit verison %SYSTEMROOT%\Microsoft.NET\... -i For the 64bit version %SYSTEMROOT%\Microsoft.NET\... ...
Microsoft have now released Web Matrix (and ASP.NET MVC3 if you so inclined!) One signifcant utility is IIS Express which will replace Cassini It is worth noting that SP1 for VS2010 should be out in Q1. Links: http://www.hanselman.com/bl... http://www.hanselman.com/bl... http://arstechnica.com/micr... ...
The Gu and the Haack had just announced the ASP.NET MVC 3 RTM had been released yesterday. You can download the intall file, release note and source code here. As the Gu said with the ASP.NET MVC 3 there are some other productions released as well NuGet IIS Express 7.5 SQL Server CE 4 Web Deploy & Web Farm Framework 2.0 Orchard 1.0 WebMatrix 1.0 The Orchard is a CMS and blogging system which build from ASP.NET MVC 3 with the new Razor view engine which can be found here and here. Hope this helps, ...
Along with the release of WebMatrix announced here.. http://blogs.msdn.com/b/web... A slew of dependencies were released as well. If you download WebMatrix, it will install these dependencies – also via a new release of the Web platform installer (3.0). You get IIS 7.5 Express for hosting the Web Matrix projects as well. And, to top it off – the Microsoft Web Deploy 2.0 tool… The ASP.NET updates include the Visual Studio 2010 tools updates, ...
I just released an open source project at codeplex, which includes a set of T-4 templates to enable you to build logical layers (i.e. DAL/BLL) with just few clicks! The logical layers implemented here are based on Entity Framework 4.0, ASP.NET Web Form Data Bound control friendly and fully unit testable. In this open source project you will get Entity Framework 4.0 based T-4 templates for following types of logical layers: Data Access Layer: Entity Framework 4.0 provides excellent ORM data access ...
1,000 blogposts is quite a few, but to die-hard geeks, 1000 isn't the number... 1K is the number, and today is my 1K blogpost! I've been working up to this for at least 11 months. Way back at MIX10, I approached some vendors about an idea I had. A month ago I contacted them and others, and everyone I contacted was very generous and supportive of my idea. My idea was not to run a contest, but blog as normal, and whoever ended up on my 1K post would get some swag... and I set a cut-off at 13 posts. ...
Una de las opciones que todo aplicación debería tener es el poder ponerse en modo OFFLINE para evitar el acceso de usuarios. Esto es completamente necesario cuando queremos realizar cambios a nuestra aplicación (cambiar algo, poner una actualización, etc) o a nuestra base de datos y evitarnos problemas con los usuarios que se encuentren logueados dentro de la aplicación en ese momento. Muchos ejemplos a través de la Web exponen la forma de realizar esta tarea utilizando dos técnicas: 1. La primera ...
ASP.NET applications can make use of the System.Web.Caching.Cache object to cache data and prevent repeated expensive calls to a database or other store. However, ideally an application should make use of caching at the point where data is retrieved from the database, which typically is inside a Business Objects or Model layer. One of the key features of using a UI pattern such as Model-View-Presenter (MVP) or Model-View-Controller (MVC) is that the Model and Presenter (or Controller) layers are ...
I have been specifically requested to blog about getting an ASP.NET 4.0 site working on a Windows 2008 server that has never run a 4.0 web site before. Make sure the 4.0 framework is installed on the server! Patch it will ALL the security patches have been applied. ((for a live server, make sure that you tested the patches on your development server first) You will find the HTTP Log status codes at http://support.microsoft.co... - they are very important in understandign the IIS logs) After ...
Problem As was mentioned in a previous blog I am building a web page that allows the user to select dates in a calendar and then shows the dates in an unordered list. The problem now is that those dates need to be sent to the server on page submit so that they can be saved to the database. If I was storing the dates in an input element, say a textbox, that wouldn't be an issue but because they are in an html element whose contents are not posted to the server an alternative strategy needs to be developed. ...
If you work with Silverlight daily then you have run into this problem. Your XAP file has been cached in your browser and you have to empty your browser cache to resolve it. If your using Google Chrome then you typically do the following: Go to Options –> Clear Browsing History –> Empty the Cache and finally click Clear Browsing data. As you can see, this is a lot of unnecessary steps. It is even worse when you have a customer that says, “I can’t see the new features you just implemented!” ...
Overview I recently needed to build a web page that would allow a user to capture some information and most importantly select multiple dates. This functionality was core to the application and hence had to be easy and quick to do. This is a public facing website so it had to be intuitive and very responsive. On the face of it it didn't seem too hard, I know enough juery to know what it is capable of and I was pretty sure that there would be some plugins that would help speed things along the way. ...
Durante estos post, mostraré los 10 problemas o errores de configuración en el web.config que provocan grandes vulnerabilidades en las aplicaciones. Estos errores, en su mayoría vienen dados por desconocimiento a fondo del manejo de las secciones de configuración de nuestras aplicaciones. En esta primera parte, veremos los primeros 5 de ellos. 1. El modo Custom Errors Este es el primero de nuestra lista, ya que, será uno de los que casi siempre habilitemos cuando estamos desarrollando una aplicación ...
In this Issue: Dennis Doomen, Doug Holland, Kunal Chowdhury, Sacha Barber, Paul Sheriff, Mike Snow(-2-), Peter Kuhn(-2-), and Mike Ormond. Above the Fold: Silverlight: "Silverlight: Fixing the BookShelf Sample" Peter Kuhn WP7: "Searching the Windows Phone 7 Marketplace Programmatically" Doug Holland Prism/Cinch: "PRISM 4 Custom Transitioning Region" Sacha Barber Shoutouts: Sacha Barber the author of Cinch asks for some advice from users: Cinch V2 : Question For The Reader Michael Crump introduces ...
A user in the forums (http://forums.asp.net) is asking how to insert sub rows in GridView and also add delete functionality for the inserted sub rows. In this post I'm going to demonstrate how to this in ASP.NET WebForms. The basic idea to achieve this is we just need to insert row data in the DataSource that is being used in GridView since the GridView rows will be generated based on the DataSource data. To make it more clear then let's build up a sample application. To start fire up Visual Studio ...
So, I have been pretty quiet for the last month or so. True, it has been holiday time and I went to Cape Town for a stunning week of sunshine and blue skies, but the second I got back home I spent the remainder of my holiday on my pc viewing tutorials on www.tekpub.com Craig Shoemaker, who I got in contact with because of his podcast, sent me a 1 month free subscription to the site and it has been really appreciated. I have done a lot of WPF programming in the past, but not any asp.net stuff and ...
Few weeks ago I was working with a small internal project that involves importing CSV file to Sql Server database and thought I'd share the simple implementation that I did on the project. In this post I will demonstrate how to upload and import CSV file to SQL Server database. As some may have already know, importing CSV file to SQL Server is easy and simple but difficulties arise when the CSV file contains, many columns with different data types. Basically, the provider cannot differentiate data ...
I have been spending the last 2 weeks immersing myself in a number of Windows Azure and SQL Azure technologies. And in setting up a new business (I’ll speak more about that in the future), I have also become a customer of Microsoft’s BPOS (Business Productivity Online Services). In short, it has been a fortnight of Microsoft cloud computing. On the Azure side, I’ve looked, of course, at Web Roles and Worker Roles. But I’ve also looked at Azure Storage’s REST API (including coding to it directly), ...
Microsoft have made available a security development starter kit at http://www.microsoft.com/se... Actual Download is at http://www.microsoft.com/do... The kit is free and covers a variety of security concerns for ASP.NET developers ...
At http://weblogs.asp.net/infi... there is an excellent post on how to open a new windows from code behind. The purists may not like it but it helped solve a problem for a client's client. Here is an update for VS2010 users: using System; using System.Web; using System.Web.UI; /// <summary> /// Response Helper for opening popup windo from code behind. /// </summary> public static class ResponseHelper ...
This book introduces a new technology that promises a considerable improvement on the ASP.NET membership system. If you ever had to write an extranet, system you should be aware of the problems in setting up membership for your site. The Windows Identity Foundation promises to be an excellent replacement. Therefore the book Programming Windows Identity Foundation - ISBN 978-0-7356-2718-5 at http://oreilly.com/catalog/... is breaking new ground. I recommend this book to all ASP.NET development ...
2010 has been a very good year for me and I wanted to create a list and thank everyone for what they have done for me. I also wanted to thank everyone for reading and subscribing to my blog. It is hard to believe that people actually want to read what I write. I feel like I owe a huge thanks to everyone listed below. Looking back upon 2010, I feel that I’ve grown as a developer and you are part of that reason. Sometimes we get caught up in day to day work and forget to give thanks to those that helped ...
We are currently in the process of upgrading one of our applications to .Net 4.0. Aside from us geeks wanting to always use latest and greatest technologies, an immediate business need for Silverlight 4.0 features justified our upgrade endeavor. The following is a summary of some issues we ran into with our web project: For security purposes, the IIS 7 .Net 4.0 ISAPI filter is disabled. “Allow” it from the ISAPI and CGI Restrictions screen as shown: Figure 1 - Allowing ASP.Net 4.0 ISAPI Filter By ...
This is a fairly easy way to compare values for two different controls. In this example a user needs to enter in a street address and zip code OR pick a county. After that the application will display location(s) based on the value. The application only wants a specific street/zip combination or a county, not both. This code shows how to check for that on an ASP.Net page using some JavaScript. The control code: <table> <tr> <td> <label style="color: Red;">Required Fields</label> ...
The AJAX SlideShowExtender is pretty useful. It does what it says and works without much fuss. There was one trick I needed it to perform that I could not find natively within the control. That was to set the slide’s current index. With a little JavaScript however I could make the control do what I wanted. The example below assumes a few things. First you already have a SlideShowExtender setup and working (or see this post). Second this SlideShowExtender is on a page all by itself so the index to ...
In this Issue: John Papa, Tim Heuer, Jeff Blankenburg(-2-, -3-), Jesse Liberty, Jay Kimble, Wei-Meng Lee, Paul Sheriff, Mike Snow(-2-, -3-), Samuel Jack, James Ashley, and Peter Kuhn. Above the Fold: Silverlight: "Animation Texture Creator" Peter Kuhn WP7: "dows Phone from Scratch #13 — Custom Behaviors Part II: ActionTrigger" Jesse Liberty Shoutouts: Awesome blog post by Jesse Liberty about writing in general: Ten Requirements For Tutorials, Videos, Demos and White Papers That Don’t Suck From SilverlightCream.com: ...
With the new release of the Windows Azure platform there are a lot of new features available. In my previous post I introduced a little bit about one of them, the remote desktop access to azure virtual machine. Now I would like to talk about another cool stuff – Windows Azure Connect. What’s Windows Azure Connect I would like to quote the definition of the Windows Azure Connect in MSDN With Windows Azure Connect, you can use a simple user interface to configure IP-sec protected connections between ...
The code samples in Microsoft All-In-One Code Framework are updated on 2010-12-13. Download address: http://1code.codeplex.com/r... Updated code sample index categorized by technologies: http://1code.codeplex.com/w... (it also allows you to download individual code samples instead of the entire All-In-One Code Framework sample package.) If it’s the first time that you hear about Microsoft All-In-One Code Framework, ...
We just bought a new Web Server, after installing Windows 2008 R2(which is a 64bit OS and IIS7), SQL Server Standard 2008 R2 and IBM Client Access for V5R3 with its Dot Net Data Providers, I tried deploying our new project which is fully functional on an IIS6 Based Web Server, I encountered this Error The 'IBMDA400.DataSource.1' provider is not registered on the local machine. To remove the doubt that I still lack some Software Pre-Requesites or version conflicts since I encountered some erros while ...

 

Found this great website for F# code snippets here.

In this Issue: Rénald Nollet, Benjamin Gavin, Dennis Doomen, Tim Greenfield, Mike Taulty, Jeff Blankenburg, Michael Crump, Laurent Duveau, Dragos Manolescu, KeyboardP, Yochay Kiriaty. Above the Fold: Silverlight: "Silverlight RIA Services and Basic, Anonymous Authentication" Benjamin Gavin WP7: "lving Circular Navigation in Windows Phone Silverlight Applications" Yochay Kiriaty SQL Azure: "SQL Azure Database Manager – Part 1 : How to connect to your SQL Azure DB" Rénald Nollet Shoutouts: Yochay Kiriaty ...