ASP.NET 4: View State

by Rod 5. March 2010 01:36

 

As web developers we’ve all had our fair share of view state, while trying to minimize them / storing them in a database or even disabling view state for some controls one by one.

When there’s more View state then we need, we lose a lot in performance. (+ not all search engines like itL)

In previous versions of asp.net, view state was enabled by default on pages therefore we had to disable view state on the controls 1 by 1.

Well guess what??

No more CTRL + C EnableViewState="false"  AND CTRL + V 1000xx times.

Now it’s possible to simply disable View state on a whole page and just enable it on the controls we want.

Here’s an example:

My page contains 1 button and 1 label, and here’s my view state :

value="/wEPDwUKLTU2ODgwMzc3NWRkf86Sf4W2JXJIMUDuy2TW5uSqft0zrNjXFhCnQ7cjfZ8="

By clicking the button (set to change the label text), the View state gets even bigger.

Now by disabling the view state on the whole page by setting ViewStateMode attribute to “Disabled” on the page directive:

 

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" ViewStateMode="Disabled" %>

 

My view state stays the same size.

As you might have expected, the label doesn’t preserve its value since its view state is also disabled, so your choice to choose which controls you need to enable view state on.

Tags: ,

asp.net

Blog O' coding

by Rod 4. March 2010 21:38

Dear readers, this might be a bore for the usual readers.

But today is an important day for the blog!

As I applied to be a Microsoft Student Partner, and I’m studying in order to pass the .net 4 beta certifications:

My blog will start getting a coding prospect.

Basically there’ll be a “personal” category, it will contain all the previous posts + the new ones about motivation / challenge etc..

And other categories that I'll use to post about Silverlight / SharePoint / .NET 4 and maybe some about mobile development ;)

 

Visual Studio 2010

Tags:

Choices you make.

by Rod 26. December 2009 00:17

Whether its business or pleasure, you always find yourself in situations where a decision has to be made.

Sometimes some of these situations are life changing events; so when you do realize a lot of things are changing you ask yourself: “mmm what would of happened if I did “something else” instead? “

Suddenly you’d doubt yourself and you’d forget the reasons why’d did you do it!

But reminding yourself why you did it; is what will make you move forward.

I recently dealt with a major situation where my decision would mutate the rest of my career life; the decision was about whether I needed to change jobs or not, to seek new opportunities, to learn new things and finally to find different kind of challenges.

When hitting a tough point and feeling lost, I doubted myself on whether my decision was the right one or not.

This can also happen on a personal note:

I’ve decided this year to spend this winter vacation on my own instead of going back home; so I can stay focused on work.

When I hit a down turn (last night); realize I’m actually spending Christmas Eve away from family, I forgot what were the reasons that made me stay here.

I felt sad about it until I finally reminded myself why I’ve made this choice.

I promised myself not to forget why I’ve made the choices I made, in order to be able to move on without any regrets!

The conclusion didn’t turn out like I’ve hoped for, oh well…you got the point!

Tags:

Personal

Merry Christmas!

by Rod 25. December 2009 02:26
Merry Christmas

Tags:

Personal

Life changing events

by Rod 18. December 2009 15:35

It’s been a while since I posted anything.

This month was full of life changing events; I resigned from my old job to try out new opportunities / new challenges.

My teaching skills are improving day by day and I sometimes actually love it!

I’m the Campus Lab manager for the .net lab which makes things more interesting in a whole new level.

Like I’ve said before this year is going to be a hell of a ride!

Now that the Christmas vacations are close, unfortunately this year I won’t be able to spend it with family and friends from back home; (kind of disappointed!).

But its ok I already planned a charged vacation with new goals; whether they are on a professional or personal level! I’m actually looking forward to start them.

I might even change the look and feel or the whole concept of my blog. (we'll see!)

Tags:

Personal

Hell of a ride.

by Rod 25. November 2009 01:46

This year announces itself as a really interesting year full of challenges.

Like some have heard or already been taught by me! I’ve taken the responsibility of teaching .net classes in my university.

It’s been going really well, I already learned a ton of new things whereas it’s from a managerial experience, technical or just teacher-student relationship.

I still didn’t teach my own promotion, I guess it’s going to be the biggest challenge since they are not only just colleagues but also friends.

On top of that I’m launching my campaign to be the Campus Manager of the Lab which will bring another ton of new things to learn and experience.

At the same time by doing that I hope to improve the .net community in university by making it a lot more active; a lot of good ideas are coming through.

I’m writing this post while taking a break from work, at this point of my life I wish I could actually “buy time”. Of course feels like I’m over working myself between work + teaching + actually being a student but I know it’s worth it and going to be one hell of a ride this year!

Tags: ,

Personal

SUPINFO International University

by Rod 26. October 2009 23:37

I never did an article about my school so going to dedicate some time and write about the university that’s helping build my career.

My school is often criticized by its marketing and teaching methods. It’s probably the first school in France to ever distinguish what’s computer science related and what’s not. ( In most universities you’d be hammered with none CS related courses the first 2 years and a little of ACTUAL related courses).

Being in a competitive world, SUPINFO certainly marked its territory all over France and internationally (China, UK , USA , Canada etc..).

A lot of people (specially teachers or students outside of the school) talk about SUPINFO like it’s an money pumping enterprise because of all the partnerships it has with other companies like Microsoft , Oracle, Cisco and much more. The fact is companies do decide the trends, and if your university doesn’t follow that – you will be left behind!

A lot of talented students have graduated from SUPINFO, and still a lot to come; Imagine Cup (Worldwide tournament organized by Microsoft) is one of the best examples of innovating students showing their talents;and somehow every year SUPINFO proves it self as a competitive leader.

Like every university, there are ups and downs;

It’s every SUPINFO students job to actually make these ups count more, make it work for the best and build up his own path of opportunity and not actually wait for it to happen.

Speaking of which, I’m going to stop bragging about my university and go back to work (yes I make my career happen) hoping the retweets on SUPINFO will calm down!

Tags: ,

Personal

Moving forward.

by Rod 16. October 2009 13:01

Naturally people are afraid of change, afraid of moving forward; knowing it’s hard to predict what’s going to happen next.

Wether it’s on a business or personal level, one intend to hang on to a past, a routine of doing things which can blind from future opportunities; Dipping your toes into undiscovered grounds is often a challenge, obstacles from the past might appear, doubts about how things might of turned out if you hadn’t taken your shot.  

So you ask yourself is it all worth it ?

Embrace change!

 

Tags:

Personal

Social Media Revolution

by Rod 4. October 2009 13:03

Tags:

Personal

Comfort zone.

by Rod 24. September 2009 13:41

After a while of hard work into proving yourself, always learning to stay on top of things, you find yourself in a comfort zone; where day to day issues once considered as challenges become uninteresting minor obstacles.

When realizing you are in a comfort zone, you wonder: should I stay in that comfort zone?  Is it worth slowing my climb?

Naaaa still early, think I’ll take on a few new challenges; might make things worthwhile.

 

Tags:

Personal

Rodrigue Hajjar
Powered by BlogEngine.NET 1.5.0.7

About the author

Rodrigue Hajjar

.NET Developer.

.Supinfo Student.

 

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar