Tag | ASP.NET Posts

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 ...
When working with Sitecore there are some optimizations/configurations I usually repeat in order to make my app production ready. Following is a small list I have compiled from experience, Sitecore documentation, communicating with Sitecore Engineers etc. This is not supposed to be technically complete and might not be fit for all environments. Simple configurations that can make a difference: 1) Configure Sitecore Caches. This is the most straight forward and sure way of increasing the performance ...
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 ...
Ankit Normal Ankit 3 9 2012-03-08T14:34:00Z 2012-03-08T14:36:00Z 1 395 2255 18 5 2645 12.00 Clean Clean false false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-qformat:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin-top:0in; mso-para-margin-right:0in; mso-para-margin-bottom:10.0pt; ...
We are looking to hire someone with (but not necessarily all of!) :- - Good web skills Javascript / Html / CSS + any javascript frameworks Jquery / Knockout etc - ASP.NET MVC 4 (or earlier) - ASP.NET Webforms ( any exposure ) - SQL Server / NHibernate ( or other ORMs ) - Webservices -WPF ( we do a number of inhouse windows apps ) - A love of software development and good development techniques! You can see what we do at http://www.outpostcentral.com Drop me an email at keith dot nicholas AT outpostcentral.com ...
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 ...
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 ...
ASP.NET MVC 3 Walkthroughs & Books 1. Intro to ASP.NET MVC 3 - Rick Anderson http://www.asp.net/mvc/tuto... 2. Building an MVC 3 App with Database First – Julie Lerman a. http://msdn.microsoft.com/e... 3. Walkthrough: Retrieving Entity Types with a Stored Procedure (Entity Data Model Tools a. http://msdn.microsoft.com/e... 4. Book – Wrox - Professional ASP.NET MVC 3 http://www.wrox.com/WileyCD... ...
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 ...
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#+EF+LINQ+AJAX+JQu... which go together like coffee crumble ice cream. I am a Microsoft ASP.NET MVP since 2009, Microsoft Influencer and a regular contributor at CodeASP.NET ...
JetBrains have recently released ReSharper 6.1, along with compatible updates to dotCover (version 1.2) and dotTrace Performance (version 4.5.2). Here is a list of common developer tasks that ReSharper 6 helps handles better than previous versions: Improve Visual Studio responsiveness: While developing ReSharper 6.0 and 6.1, Jet Brains have fixed more than 200 performance and memory consumption issues, as well as over 2900 bugs!Use proper tooling for web development: ReSharper 6 introduces extensive ...
In a previous posting, I discussed replacing the stock MVC serializer used for the JsonResult exposed when you use the controller method Json(..) instead of View. This was all find and dandy. But how – you may wonder – can I call actions that contain complex parameters? Do I need a special binder? Should I write my own? The answer is mostly "no". As Phil Hack blogged, the ASP.NET MVC framework already contains value providers that take care of that for you. All you need to do is ensure that your ...
Today's $10 Deal of the day from APress at http://www.apress.com/97814... is Beginning ASP.NET 4 in VB 2010"The most up-to-date and comprehensive introductory ASP.NET book you'll find on any shelf, Beginning ASP.NET 4 in VB 2010 guides you through Microsoft's latest technology for building dynamic web sites. This book will enable you to build dynamic web pages on the fly, and assumes only the most basic knowledge of Visual Basic." I recommend this book to all VB.NET developers ...
Few days ago I wrote a simple demo about “Using ProudMonkey Controls with ASP.NET AJAX Update Panel”. One small problem is that if for some reasons you will place the MessageBox control outside UpdatePanel then you’ll notice that the MessageBox will not display properly in the page. So if you were setting your html mark-up like this: <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <%@ Register Assembly="ProudMonkey.Commo... Namespace="ProudMonkey.Comm... ...
ASP.NET Enterpise Manager is a web based database management system designed specifically for the management of Microsoft SQL databases through a web browser, without the need for any desktop database management systems such as Microsoft’s SQL Server Management Studio. ASP.NET Enterprise Manager is included as default with an installation of Plesk for Windows, meaning that if you are a customer who uses Plesk based Windows hosting, you will most likely have used ASP.NET Enterprise Manager at least ...
This demo is a continuation of my previous article about "Creating a Simple Log-in Form". Basically in this post I'm going to demonstrate the basic on how to edit and update the form with ASP.NET MVC 3. Before you go any further, I'd suggest you to check out my previous article first about "ASP.NET MVC 3: Creating a Simple Sign-Up Form" and "Creating a Simple Log-in Form". STEP 1: Creating the Model class Just for the simplicity of this demo, I'm just going to display the FirstName, LastName and ...