DCSIMG
ASP.Net - IronShay

Browse by Tags

All Tags » ASP.Net (RSS)

Mass Assignment Vulnerability in ASP.NET MVC

A couple of days ago the Ruby on Rails world got shocked by an old bug (or feature?) that could cause massive security issues sometimes. You can read about it here . While reading about this vulnerability, I figured out that ASP.NET MVC worked in a very similar way… would it reproduce in an ASP.NET MVC environment? well, of course! The Problematic Feature ASP.NET MVC has this very convenient way of getting parameters from the request named Model Binding. The very simple example of Model Binding is...
Posted by shayf | with no comments

Embrace it–JavaScript will Rule the World (Wide Web)

At the moment, we’re witnessing two opposite yet related changes – on the one hand, front-end computers become smaller and more mobile and on the other hand, servers are centralized into large server farms – moved to the cloud. Web development has changed quite a bit as well – more and more functionality has moved to the client along with the rise of client-side frameworks like JQuery, MooTools and others. Having said that, it seems at the moment that there’s still a lot going on on the server-side...
Posted by shayf | with no comments

The Big View Engine Comparison – Razor vs. Spark vs. NHaml vs. Web Forms View Engine

One of the cool things about ASP.NET MVC (and other MVC web frameworks) is its capability to change the default view engine with a Microsoft or a 3rd-party one. ASP.NET MVC currently has a few options for view engine alternatives: The web forms view engine – this view engine, with the ASP-like syntax, is the default one for ASP.NET MVC 1 and 2 applications. Razor – the new view engine which will be the default one for ASP.NET MVC 3 applications. Spark – an open-source view engine which aims to seamlessly...
Posted by shayf | 7 comment(s)

Right Underneath Scott Guthrie!

My recent post – 5 Reasons to be excited about ASP.NET MVC 3 has made it to the front page of http://asp.net ! I’m just 2 rows under Scott Guthrie! Mom will be proud! Shay.
Posted by shayf | with no comments
תגים:,

5 Reasons to be Excited about ASP.NET MVC 3

It’s already been 6 months since ASP.NET MVC 2 was released and version 3 is already taking shape. I, personally, am thrilled about that because this version seems to put ASP.NET MVC, in terms of maturity and functionality, on the first line along with other MVC frameworks out there like RoR. I’ve put together 5 main reasons why I’m excited about this upcoming version. What about you? 1. The Razor View Engine I said it before and I’ll say it again – the razor view engine is so cool!!! I really like...
Posted by shayf | with no comments

“But you need to master HTML for that, don’t you?”

I was talking with a guy the other day about choosing ASP.NET MVC over ASP.NET web forms. I told him why I think ASP.NET MVC is better (I believe it’s the way to go if you’re a .NET web developer ) and he, in turn, tried to throw at me reasons of why not use ASP.NET MVC. This conversation is legit and it’s been going on since the very beginning of the ASP.NET MVC project. However, there are a few things which are NOT legit in this conversation. One of them is the sentence from the title: “But you...
Posted by shayf | 3 comment(s)
תגים:,

Upcoming Gig: Epicenter 2010

The conference season is coming and it’s time to let you know where and when you can see and meet me! So… This June I’ll be speaking at the Epicenter 2010 conference , taking place on June 8th-11th in Dublin, Ireland. The conference will be hosted in the Arts building of Trinity College, which just looks awesome: Anyways, it’s technology we’re interested in! So I’m going to have two talks in the conference: When: June 9th, 11:00 Title: Practical IronRuby Abstract: Ruby has been a home for some great...

The Brand New Menu.IncludeStyleBlock Property

Along with the popular new features of ASP.NET 4, some uncommon features have been added as well. One of them is the Menu control which has gone through some changes, good ones. One of the changes to the control is the new IncludeStyleBlock property. This is a boolean value which indicates whether the control adds its CSS to the page. “Oh well…” you might say, but stop and rethink it – until now, when you used the Menu control you always had the CSS added to the page, whether you liked it or not...
Posted by shayf | 2 comment(s)
תגים:, ,

Printing Web Pages – the Cool Way!

When developing web applications we often run into a request to print one or more pages within the applications. In most cases, these pages will contain some type of report. There are tons of ways to do that. Most of them I don’t like, especially the trivial one that pops to mind - “open a new window with a printer-friendly version of the page and set onload=’window.print()‘” . I find it quite irritating for the user. There is another solution, which is less popular than its fellow window.open solution...
Posted by shayf | 2 comment(s)
תגים:, ,

Good to Know: Built-in ASP.NET Http Handlers

Http handlers is a really elegant infrastructure allowing you to provide special behavior to specific paths in your application. You can use them to create RSS  feeds, dynamically generate images, handle requests differently and  more. Apart from writing new http handlers, there are some built-in handlers that you can take advantage of. The built in handlers are separated into three categories (in my opinion at least): request handlers, error generators and misc. handlers. Request Handlers...
Posted by shayf | with no comments
תגים:,

A Handy Extension Method: Get The Current Page Load Mode

I find myself pretty often write code to find out if I’m on a postback, callback or initial page load. I’ve decided to put an end to that and write an extension method to the ScriptManager class that will tell me the mode I’m in. This is what I came up with: public static class Extensions { public enum PageLoadMode { /// <summary> /// Occurs when the page is loaded for the first time. /// </summary> InitialPageLoad, /// <summary> /// Occurs on a regular postback. /// </summary>...

A BAD of Roses - JQuery UI Dialog and ASP.Net AJAX

You see, all I wanted was to integrate JQuery’s dialog into my ASP.Net application. The JQuery guys really did an amazing job there and it’s a shame no to take advantage of it. So I did. The outcome: 5 days trying to figure out what’s wrong (that includes the weekend!) and eventually, a fragile solution that made me abandon the whole thing. In this post I’m going to briefly introduce you with the JQuery UI dialog, explain the problem I had, the cause to the problem and my frail solution suggestion...
Posted by shayf | 14 comment(s)
תגים:, ,

Converting ASP.Net 2.0 GridView to Excel CSV and HTML Formats

This time I'd like to share a small utility I've made that converts ASP.Net GridView object into CSV or HTML files that can be opened using the MS-Excel application. [Link to download the code file is at the end of the post]. Why using the GridView? If you're already using a GridView in your page to show some data, why not use its out-of-the-box localization and formatting capabilities? Every time that I run into an ASPX page that shows data with an "export to excel" feature...
Posted by shayf | 1 comment(s)
תגים:,