Tag | ASP.NET Posts

I can't believed I will reach this boundary. Despite all the busy stuff that's going on in my life and at work, I still manage to contribute to the ASP.NET community and helped thousands of people resolving issues and guiding them to the right path of ASP.NET world. I am really honored to achieved this milestone and it feels great. If time permits, I hope I could be able to do the same at other various forums that I have participated such as C# Corner, CodeASP, ASPSnippets and Xamarin community forums. ...

Search engines hate query strings. For example, say you have a website that sells widgets. You have four types of widgets: red, green, blue and black. You have a page titled Inventory.aspx that accepts a query string to show each of the widgets, like this: www.MyWidgetSite.com/Widget... To make this more SEO friendly, you could have a URL like this: www.MyWidgetSite.com/Widget... That allows a search engine to index the site easier, and to more easily identify relevant content for search ...

I had a review copy of Jose Luis Latorre Millas's Microsoft .NET Framework 4.5 Quickstart Cookbook. This book was given to me by Packt Publishing few months ago but didn't got a chance during that time to give an insight about the book. While i am very much eager to sit down and read them, I was not able to do it right away because of the projects that I've been working on. It's been very busy and will always be. Thankfully, I did find some time few days ago to finally give this a read and publishing ...

Introduction SignalR is a pretty new and very exciting feature in ASP.NET. It offers a simple and clean API that allows you to create real time web applications where the server needs to continuously push data to clients. Common applications are chat, news feeds, notifications and multi-player games. For this exercise we’re going to build a simple chat application in ASP.NET MVC 4 using the power of SignalR. I presume that you already have the basic knowledge on ASP.NET MVC and how stuff works (e.g. ...

Yesterday’s training session was a success with few developers from Cebu attended the session. The core topic I’ve talked about was ASP.NET MVC. Here’s the full list of the topics below: An Intro to ASP.NET MVC MVC and MVP Pattern – The Difference MVC and WebForms – The Difference What does ASP.NET WebForm and MVC values? Core ASP.NET MVC and it’s core features An Intro to Entity Framework and LINQ Sample MVC Application Demo Creating a Sign-Up page Creating a LogOn page Fetching, Editing and Updating ...

I am very honored to have received this award again. This is my fifth year in a row now and it feels really great! ;) That past year was a really blast and had a great time with the MVP Global Summit, was able to create and published new versions of my open-source controls at Codeplex, technical forum contributions, blogging,writing articles and speaking. I’m glad and very happy that I made it again this year despite of all the busy stuffs at work and life, I still manage to contribute to the ASP.NET ...

ASP.NET SignalR is pretty new and very exciting feature in ASP.NET. You might want to play around with it and may encounter some hiccups during your implementation. This post will cover some issues that you may encounter and how to avoid it. If you have declared the following scripts in your View(.cshtml/.aspx) <script src="~/Scripts/jquery.signa... <script src="/signalr/hubs" type="text/javascript">&... <script type="text/javascript"> $(function ...

Introduction: This question has been asked many times at the forums (http://forums.asp.net) and definitely there are already bunch of different solutions provided. Most of the examples from the web are using DataSource controls (e.g SqlDataSource, ObjectDataSource, etc..) to implement cascading DropDownList in GridView and I can’t seem to find a formal example that demonstrate how to implement it without using DataSource controls. Note: Before you proceed, make sure that you already know the basics ...

This question was asked from the forums.asp.net and thought I’d blog about it for future reference. The question is “how do we set ReadOnly for autogenerated columns in gridview when it’s on edit mode?”. Well as you may know autogenerated columns are created dynamically on the fly and so we need to manually access each columns in the code before we can set their properties. To make it more clear we’ll create a simple demonstration. Consider that we have this HTML mark-up below: <asp:GridView ID="GridView1" ...

Vishal Ranjan invited me to have a short interview about myself. The details of the interview was featured in his blog here: Interview with Vincent Maverick Durano Technorati Tags: Community,General,Asp.NET ...

ASP.NET has a good number of default controls which usually satisfy your needs. Especially the ListView control, which is a template based fully customizable control which can be tweaked to suit your needs. However, ASP.NET does not have a good Image Grid control (a kind of control you would want to use as a photo gallery), I will show you how you can create one simple Image Grid for yourself. I am using Visual Studio 2012 Express for Web for this exercise, however you can achieve the same with full ...

I came across this column sizing weirdness the other day. Using a RadGrid the headers looked great. The rows with the data however sized however they felt like it, usually way too small. After looking around I came across this that solved my problem. Adding the meta tag of <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> in the head section of my aspx page was what I needed. My issue was pretty specific since I had to target IE8 for the app I was working on but it may apply to ...

Yes, Just got an email from Microsoft that I have been re-awarded as an ASP.NET/IIS Microsoft MVP for 2012. The last year for sure was very busy with projects and I’m glad I made it again and able to contribute to the ASP.NET community. It is really a big surprise to me! Wohooo!! =) I am looking forward to contribute more in the community. BIG thanks to Microsoft, my MVP Lead Lilian Quek, Clarisse Ng our SEA MVP Program Specialist, family, friends, readers, and everyone who has supported me!!! Technorati ...

This is not a new item at all but I came across it recently. For an app I had been using some JavaScript like: javascript:window.open(some... here) to open a new window via a button. That bit of code had been working great in several other apps. Then in one app that same code decided to open the new window correctly while clearing the parent of everything but [object]. The fix ended up being simple, change the javascript to: javascript:void(window.open... here); Then it worked like ...

If you have a GridView that uses BoundFields but does not display line breaks or a lot of spaces quite right here is a way to get around that. This example uses a GridView with one BoundField that uses a DataField of comments. The comments are stored in a database and entered from another page which displays the comments properly in a textbox with all the spaces and line breaks you intended. The trick to get a BoundField to show those items is to take the item and replace the \r\n with a <br /> ...

One of the things I always forgot to add to my web applications is the Robots.txt file that Search Engines use to see what they should index. This file and site maps help make your site easier to navigate by the bots and let them know what is legal and what you would rather not have the published in their engines. I typically add any administrative pages or account pages even though they are protected by security, no need for the login page to be index if they sniff the link. So how do you add Robots.txt ...

At http://www.troyhunt.com/201... there is a free ebook on securing your ASP.NET web sites.The PDF is at https://asafaweb.com/OWASP%... https://asafaweb.com/ there is an Automated Security Analyser for ASP.NET Website ...

You might be in an environment where you code is source controlled and where you might have build options to different environments. I recently encountered this where the same code, built on different configurations, would have the website at a different URL. If you are working with ASP.NET as I am you will have to do something a bit crazy but worth while. If someone has a more efficient solution please share. Here is what I came up with to make sure the client side script was placed into the HEAD ...

This post is pretty specific to an issue I had but still has some ideas that could be applied in other scenarios. The problem I had was updating a few buttons so their Text values could be set in the code behind which had a method to grab the proper value from an external source. This was so that if the application needed to be installed by a customer using a language other than English or needed a different notation for the button's Text they could simply update the database. Most of the time this ...

There is much simpler and graceful way to shut down a site while doing upgrade to avoid the problem of people accessing site in the middle of a content update. Basically, if you place file with name 'app_offline.htm' with below contents in the root of a web application directory, ASP.NET will shut-down the application, and stop processing any new incoming requests for that application. ASP.NET will also then respond to all requests for dynamic pages in the application by sending back the content ...

For the last decade, I have repeatedly, in my imitable Microsoft fan boy style, offered an alternative view to commonly held beliefs about Microsoft's stance on open source licensing. In earlier times, leading figures in Microsoft were very vocal in resisting the idea that commercial licensing is outmoded or morally reprehensible. Many people interpreted this as all-out corporate opposition to open source licensing. I never read it that way. It is true that I've met individual employees of Microsoft ...

We are almost done everything about the WCF transport extension over the message bus, which makes our services can be scaled out by introducing more instances over machines and servers. We had finished the structure of our transport extension and implemented the request reply mode in the 2nd post, the datagram and duplex mode in the 4th and 5th post. As I have said at the end of the 5th post, currently we can use our transport extension. But there still something left. Although are not that major ...

The ASP.NET MVC template drops a copy of Modernizr 1.7 in your project automatically, and if you check for NuGet updates the library is brought up to the current version - 2.5.3. The NuGet package is a a great way to introduce developers to Modernizr and makes checks for updates easy. But when adding Modernizr to your projects consider two alternatives: Alternative One – Content Delivery Network: Microsoft CDN currently hosts two Modernizr versions – 1.7 and 2.0.6. By using a CDN copy you increase ...

In our last post I demonstrated how to implement the datagram channel shape, and in the second and third post I described the request reply shape. In this post I will explain the last MEP in WCF, duplex, which is the most complex one. Basis of the Duplex Channel Shape (MEP) In the MSDN document it said that “The duplex MEP allows an arbitrary number of messages to be sent by a client and received in any order. The duplex MEP is like a phone conversation, where each word being spoken is a message. ...

Recently, I was facing a problem where if there was a validation error, and if I changed the state of checkbox it won't postback on first attempt. But when I uncheck and check again , it postbacks on second attempt...this is some quirky behaviour in .ASP.Net platform. The solution was to reset Page_BlockSubmit flag to false and it works fine. The following explanation is from http://lionsden.co.il/coded... Submit button on the page is a member of vgMain, so automatically ...

Today's $10 Deal of the Day from APress at http://www.apress.com/97814... is Pro Agile .NET Development with SCRUM."Pro Agile .NET Development with SCRUM guides you through a real-world ASP.NET project and shows how agile methodology is put into practice." ...

The Problem I got a compilation error in my ASP.NET MVC3 project that tested my sanity today. (As always, names are changed to protect the innocent) The type or namespace name 'FishViewModel' does not exist in the namespace 'Company.Product.Applicatio... (are you missing an assembly reference?) Sure looks easy! There must be something in the project referring to a FishViewModel. The Confusing Part The first thing I noticed was the that error was occuring in a folder clearly not in my project ...

Recently I ran into an issue where the paging text in a RadGrid control needed to be customizable. In my case I was specifically looking at the "Page size" and "xx items in yy pages" text. Getting around it for the "Page size" was a snap. If your RadGrid is called rgTest one line would do it: rgTest.PagerStyle.PageSizeL... = "your text here"; The "xx items in yy pages" was a bit trickier, but still handled in one line of code. rgTest.PagerStyle.PagerText... = "{4} {5} things in {1} my pages"; ...

Today's O'Relley Deal of the day at http://shop.oreilly.com/pro... is Programming Microsoft® ASP.NET 4by Dino Esposito. "Completely reengineered for ASP.NET 4—this definitive guide deftly illuminates the core architecture and programming features of ASP.NET 4 in a single, pragmatic volume. Web development expert Dino Esposito provides essential, architectural-level guidance, along with the in-depth technical insights designed to take you—and your solutions—to the next level. The ...

-Who is interested about SharePoint Web Development but looking for a guideline how to start? A SharePoint Technical session will be held on Tomorrow 12PM at BASIS SOFTEXPRO 2012. I hope you already registered for the session as you need to sign up to attend the following session. A brief summary of my session: Microsoft SharePoint is a web application platform developed by Microsoft. SharePoint is typically associated with web content management and document management systems, but it is actually ...

Single Page Application Frameworks are gaining popularity in the ever evolving web community with lot of libraries such as JavaScriptMVC, Backbonejs and many other libraries. ASP.NET MVC 4 introduces experimental support for building single page application (SPA) through a template. Much of the plumbing work of wiring up the client side scripts, javascript modelviews and the controllers is automated, making it a quick start to develop SPAs relatively easier. Lets examine a scenario where we are building ...

I have started to experiment with MiniProfiler to log our query performance. We currently use a mix of pure SQL and Entity Framework, since we need Fulltext search some pure SQL is unavoidable. Depending on the hotspots more queries will move back to pure SQL but for simplicity’s sake trivial queries will remain with EF. Getting started is relatively easy once you figure out which part of the documentation applies – I found my ways through various Stackoverflow questions and GitHub. Starting point ...

Today's $10 deal of the day from APress at http://www.apress.com/97814... is Pro ASP.NET 4 CMS"This book will immerse you in a variety of advanced topics, including architecting different application data tiers, memory caching paradigms, data mining, and search engine optimization. " I have reviewed this book and recommended it last 30/Nov as follows: This book is more than just a book about an ASP.NET CMS system - it has much practical advice and examples for the Dot Net web developer. I liked ...

A Windows healthcare application for clinics and physicians needed a cost-effective way to accommodate all operating systems without reducing the existing functionality and security. Since users use a variety of operating systems, it was determined that a web-based version of the application was the best way to overcome those installation roadblocks. This was also a great opportunity to enable tablet access as well and reach users who use tablets such as the iPad for work. A solution to turn this ...

Mac type grid view control for asp.net/java web applications For one of my project, I made a very dynamic grid which is totally HTML based and very fast while rendering data from server. Features: 1. No viewstate 2. Dynamic grid which gets data on scroll using REST based WCF service in JSon 3. No DOM modifications which makes the rendering very fast 4. Custom control which can be integrated in any web application – Java / Asp.Net (However I built it for Asp.Net) 5. Support for very large record set. ...

Random and unique are two different words with very different meaning. To generate random number, there are many algorithms but none to guarantee unique number. This causes a problem of non-unique GUID and SessionId generated in any application whether you use .NET / java / php. (I have seen this in ASP.NET and java). If you grill down to the algorithm that is used to create SessionId, it does never guarantee a unique number whenever it is generated. When you hover over the SessionId in ASP.NET application ...

Today's $10 Deal of the day from APress at http://www.apress.com/97814... is Applied ASP.NET 4 in Context"Applied ASP.NET 4 in Context answers the commonly asked question, "Yes, but how does it work in reality?" Through a series of carefully constructed examples, the book shows how ASP.NET works in a real-world context, showing how technologies and best practices can be drawn together to create well-crafted web applications." I have read other books by Alan Freeman and I know he is an excellent ...

It's been exactly over three years and two months since I last logged in to this blog. The last post which I made on Dec 2008, was itself after a one year gap :). Well, now let me try if I can continue this activity. Lot of learning, lot of new cool stuffs. Technology itself has been changed quite dramatically over this period with the addition of new cool stuffs and I believe my English as well improved a little bit :). Microsoft developers finally started realizing the drawbacks of ASP.NET architecture ...

I've been receiving requests for the source code of my MessageBox controls for ASP.NET and so I've decided to upload my project in CodePlex so everyone can use it. You can check and download the controls here: http://proudmonkeycontrols.... Download Documentation Feel free to visit my project page and provide your valuable feedback! Thanks ...

There are times that we need to prompt the users when doing certain actions on the page. One practical example is to confirm the user when deleting a certain record just like what I have demonstrated awhile back about Displaying a Confirmation Message on GridView Deleting. If you noticed on that demo I simply use plain JavaScript to display the confirmation message. In this post I’m going to demonstrate how to use the ConfirmBox control in delete scenario. Note that just for the simplicity of this ...

It's important to understand the account that IIS is running under when you need to make changes to the security settings. If, for example, your Web application writes to files or to a database, you'll need to grant the correct permissions to the folder or database. Before you can change these security settings, it's important the know what account IIS is using. This FAQ details the various options available, both for "classic" ASP and ASP.NET applications. There is a big difference between classic ...

I would like to share that I will be speaking at the Deerfield Beach Coders Café on February 7th, 2012 6:30 PM on concepts behind PRISM and MEF including IoC Containers, Composition, Dependency Injection, Loose-coupling and Inheritance. We will be also adding a little Agile spin to the talk focusing on the importance and ideal use of the underlying design patterns in an Agile software shop. I am also scheduled to present a similar topic at the upcoming South Florida Code Camp taking place on Saturday ...

In this article, I will show you some tips to improve your ASP.NET performance. 1. Disable the Debug Mode or Set Debug =”false”How it affect performance: By default this attribute is "true" when you create new application and is useful when you are developing the application. Debug = true means that pdb information to be inserted into file and this results a larger file size and it's performance issue. Before deployment you should set the following tag <compilation defaultLanguage="Vb" debug="false"> ...

Here is an easy way to retrieve the user ID from who ever is logged on to a PC using ASP.Net. This is handy for ASP.Net applications where you want to put a "Welcome joe user" label at the top, auto populate a form with the user's ID or add the user ID to some data you are storing back into a database if you keep track of who edited a record last. The code below assumes you have an aspx page with two labels on it, lblFName and lblLName. It grabs the user ID with HttpContext and then splits the ID ...

I’ve been testing\evaluating ComponentOne’s Studio for ASP.NET Wijmo suite for an MVC 3 project and I’m quickly becoming a fan! This product has so many things going for it that I’m not sure where to start. I’m going to focus on the Wijmo components, but the suite also contains a set of controls for ASP.NET WebForms development. If the Webform controls are as good as the MVC controls, they’re worth a look. There are two versions of the Wijmo components. An open source version containing 30 widgets ...

This is my first post in this new year and was thinking about a topic to write on. Lately I have been working on varied things that flexes the brain muscles and things which I haven't done before. So a lot of learning and some unlearning this new year. One of the big issue which most people faces is learning to learn!.So, today I will share my experience of how I go about learning a technology, a skill or anything you want. The first and foremost thing is the motivation. This thing is very personal ...

It was full of engineers & IT professional who were eager-to-learn about SharePoint and the presentation was exactly for them. This was my 2nd Presentation on the Community Day as I already descried about it in my previous post. Sorry to post this in late and this is just to share my feelings with you. Robiul, SoftwarePeople started the presentation for the ASP.Net Developer who are completely unfamiliar with SharePoint. He diverted his presentation to others audience who are little bit familiar ...

I work as a Tech Lead/Web Developer, focusing mainly in ASP.NET technologies. My exploration into programming began at the age of 15;Turbo PASCAL, C, C++, JAVA, VB6,Flash and a variety of other equally obscure acronyms, mainly as a hobby. After several detours, I am here today on the VB.NET to C# channel. I now work on ASP.NET+C#+MSSQL+EF+LINQ+AJ... which go together like coffee crumble ice cream. I am a Microsoft ASP.NET MVP since 2009, Microsoft Influencer and a regular ...