|
Tricky issue with HTML5 drag and drop |
|
HTML5 supports native drag and drop through draggable property and several events such as dragstart, drag, dragenter, dragleave, dragover and drop. Normally dragstart event handler is where you set the data that is to be transferred between the drag source and drop target. The drop event handler is where you handle the drop of a drag source, access the data transferred and process it further. Now, in this particular case only the dragstart and drop events were handled. And the drop event handler never used to get called. In other words dragging operation was successful but dropping operation was not. |
|
Posted On : 21 May 2013 |
|
|
ASP.NET Web Forms, MVC, HTML5 Courses in Thane |
|
Dear Readers,
We are pleased to announce availability of brand new courses specifically designed for ASP.NET developers. These courses are based on the cutting edge technologies such as ASP.NET 4.5, ASP.NET MVC 4, HTML5 and jQuery. If you care about mastering web development using ASP.NET, these courses are for you. Check out our upcoming training schedule and book your seat today! Visit our training website for more details.
Regards,
Web Team
|
|
Posted On : 13 May 2013 |
|
|
Using Cross Origin Resource Sharing (CORS) in ASP.NET Web API |
|
For security reasons browsers prohibit AJAX calls to resources residing outside the current origin. This means you under the current settings, you can't provide a service exposed by a Web API to some other origin. However, at times you might want to allow a legitimate origin to access a resource. This is where Cross Origin Resource Sharing (CORS) specifications come into the picture. While there are other ways to enable CORS at the web application level, the ASP.NET Web API takes CORS support a step further through certain attributes. Using these attribute you can fine tune CORS at the global level, controller level or individual action level. This article discusses how this support can be used in your applications. |
|
Posted On : 11 May 2013 |
|
|
Zip and Unzip Files Programmatically in C# |
|
Most of us deal with Zip files on a daily basis. Normally people use some third-party utility to create, open and extract Zip files. At times you may want to deal with Zip files programmatically. Luckily, .NET framework 4.5 introduces some new classes in System.IO.Compression namespace that allows you to do just that. Using these classes you can create new Zip files, open and modify existing Zip files and extract the contents of Zip files via code. This article examines some of these classes. |
|
Posted On : 04 May 2013 |
|
|
Working with Arrays in C# |
|
Arrays are frequently used to store data of the same type. You can use arrays in C# in many different ways. Although single dimensional arrays are most commonly used, other varieties such as multidimensional arrays and jagged arrays are also available to C# developers. Additionally, the Array class comes in handy when it comes to sorting or searching an array. This article discusses all these types of arrays with examples of each. |
|
Posted On : 26 Apr 2013 |
|
|
Content Negotiation in Web API |
|
Whenever you access ASP.NET Web API from your client side script (JavaScript / jQuery) by default the data is returned in JSON format. However, in certain cases you may want to retrieve the data in XML format instead of JSON. On the server side, Web API determinses what data format to use for sending data to the client by doing what is known as Content Negotiation. Simply put, content negotiation is a process by which Web API inspects the incoming request and HTTP headers accompanying the request to figure out what response format(s) the client can understand. Based on this checking Web API sends the output. |
|
Posted On : 23 Apr 2013 |
|
|
Using Preprocessor Directives in C# |
|
C# preprocessor directives are commands that are meant for the C# compiler. Using preprocessor directives you instruct the C# compiler to alter the compilation process in some way. For example you may instruct the C# compiler that a particular block of code be excluded from the compilation process. This article examines several C# preprocessor directives available, with an example of each. |
|
Posted On : 18 Apr 2013 |
|
|
Edit GridView data without displaying default Edit, Update and Cancel buttons |
|
ASP.NET GridView control provides an easy way to edit and update data with the help of CommandField column type. The default CommandField arrangement is such that the Edit, Update and Cancel buttons are displayed in a column. The problem with this design is that the GridView edit column always occupies some screen real estate. Additionally in the edit mode the GridView expands horizontally disturbing the page layout. Luckily, with some easy trick you can render an editable GridView without displaying the default Edit, Update and Cancel buttons. This post shows how. |
|
Posted On : 15 Apr 2013 |
|
|
Working with Promises in Windows Store Apps |
|
To deal with the complexity involved in asynchronous programming, Windows Store apps make use of what is known as a Promise. The implementation of Promises in Windows Store apps is based on Common JS Promises proposal. At code level a promise is an object that represents the result of an asynchronous operation and returns a value at some later time in the future. Promises make it easy to work with asynchronous operations in Windows Store apps. This article discusses what promises are and also shows how to use them in a Windows Store app. |
|
Posted On : 12 Apr 2013 |
|
|
Convert GridView Data to CSV using jQuery |
|
At times you may want to allow the end user to save GridView data into CSV format for further processing (say for opening later in Excel). Doing so using server side code is quite common. However, this requires an extra round trip to the server. You can also convert data from a GridView into CSV using jQuery. This post shows how. |
|
Posted On : 08 Apr 2013 |
|