News Archives 
   
(click month to expand)
  

Recent Technology News Stories

Solentive News
Windows 7 RC available on April 30th  [click for more...]

Brandon LeBlanc posted this on the Windows blog :
“I’m pleased to share that the RC is on track for April 30th for  download by MSDN and TechNet subscribers. Broader, public availability will begin on May 5th.”

http://windowsteamblog.com/blogs/windows7/archive/2009/04/24/windows-7-release-candidate-update.aspx

Bookmark and Share
27/04/2009   [Link]
SPRING.NET + iBATIS.NET With ASP.NET MVC - Part 1  [click for more...]
This article explains how to make a web board with Spring.NET, Ibatis.NET Framework.
27/04/2009   [Link] moonhyuk
Windows 7 Release Candidate  [click for more...]
I am pleased to say that the Windows 7 RC will be available at April 30th for download by MSDN and Technet subscribers. Also, public availability will begin on May 5th. You can read more on the Windows 7 Team Blog . Windows 7 is a great OS and I am very glad that in nearest future it will be RC....(read more)
27/04/2009   [Link]
New Updates to the ASP.NET Wiki and Control Gallery  [click for more...]
Validate email addresses, add a forum, and try the time picker control in 3 of the 24 new entries in the Control Gallery. And catch up on the Provider Model, Design Patterns, and ASP.NET Open Source projects in the ASP.NET Wiki. Share your knowledge and earn Community Recognition points by contributing!.
27/04/2009   [Link] ASP.NET News
Writing Your First Domain Specific Language, Part 1 of 2  [click for more...]
A guide to writing a compiler in .NET for beginners, using Irony.
27/04/2009   [Link] Daniel Flower
New Podcasts Added!  [click for more...]
Visit the podcasts page to listen to new podcasts from Hanselminutes, Polymorphic Podcast, ASP.NET Podcast, and .NET Rocks!
27/04/2009   [Link] ASP.NET News
ASP.NET Controls – Validators problem (NetFx 1.1 versus NetFx 2.0 or higher)  [click for more...]

It is not a secret that I have a passion related to ASP.NET Controls ID and all related subjects.

This time I’ll write about a problem I found while migrating a NetFx 1.1 application to a new server.

The problem is about Validators and how they render the data needed to validate Client-Side.

Scenario NetFX 1.1.4

All data is rendered thru attributes and this way they must only follow the attributes naming conventions.

Scenario NetFX 2.0 or higher

Most required data is rendered thru Expando attributes. This means that an javascript object is created to host the required data.

At first look this seems quite the same, only with a different storage  approach, but it hides one tricky issue related to naming convention differences between Html attributes and Javascript variables.

The tricky issue

I believe that most of us tries to follow the best patterns and naming conventions and if we all did this on old applications this wouldn’t be a problem.

While migrating an old .Text v0.91 application to a new server, without NetFX 1.1 installed, I found that all pages with Validators raise a javascript error.

Digging into it I found the error in this line:

var ctl00_pageBody-2_RequiredFieldValidator1 = document.all ? document.all["ctl00_pageBody-2_RequiredFieldValidator1"] : document.getElementById("ctl00_pageBody-2_RequiredFieldValidator1");

The problem is obvious, the character ‘-‘ is a javascript operator and cannot be used in a variable name . The javascript parser after finding the ‘-‘ say that an ‘;’ is expected after ‘ctl00_pageBody’.

So … Why this didn’t occurred in the old server? What lead us to this point?

As I noticed before, in NetFX 1.1 this object didn’t exist, all data were simple rendered as attributes.

I didn’t find any good reason for naming a control like this but in fact this is a absolutely valid control ID.

The hard to find answer was “Where is the pageBody-2 control?”.

I ended up finding that this was an UserControl, loaded dynamically and its ID was also composed dynamically. Unfortunately, this was all done in a private method belonging to an internal base class and the only practical solution was to override the Page Render method and replace the pattern ‘_pageBody-‘ with ‘_pageBody_’.

I know it is a dirty solution … I don’t like it … but this is a short term solution before migrating the application to CommunityServer.

Mental note

Never use the ‘-‘ to name your controls ID property. Try the ‘_’ or any other without special meaning in Javascript.

27/04/2009   [Link]
C# COM Object for Use In JavaScript / HTML, Including Event Handling  [click for more...]
A complete example of how to create a C# COM object for use in JavaScript / HTML, including event handling
27/04/2009   [Link] Jerome Terry
Auto-suggest Control  [click for more...]
This article presents code that augments any INPUT box with an auto-suggest feature, AJAX-capable
27/04/2009   [Link] Dmitry Khudorozhkov
Presentation Model and Dependency Injection  [click for more...]
ASP.NET MVVM provides a framework to implement the Presentation Model pattern, a.k.a. the Model-View-ViewModel pattern in ASP.NET projects. Developers can take advantages of Dependency Injection and Event Broker to write concise, elegant and business focused code.
27/04/2009   [Link] Yiyi Sun
Free E-Books  [click for more...]

Free expert guide to SQL Server Profiler
283 pages of expertise from Brad McGehee have just been published so you can master SQL Server Profiler in 2009. Grab your free copy now and try out new Red Gate SQL Response for faster SQL Server troubleshooting at the same time. Download now

Free XSD eBook
When information is exchanged in XML format, you need an agreement between the sender and receiver about the structure and content. This agreement takes the form of an XSD (XML Schema Definition Language) Schema. This free ebook explains it all. Download it now and also try out Red Gate's SQL Toolbelt.”

Source: SQL Server Central

27/04/2009   [Link]
Sprints  [click for more...]
Sprints

Scrum and Agile revolve around sprints. At my previous employer, I spent two years working in one-week sprints. At my current job, I've spent another two years working in four-week sprints.

Each has their own rhythm. We ran the one-week sprint from Wednesday to the following Tuesday. Wednesday morning, we'd demo the previous week's work and we'd plan, drawing up a series of task cards, measured in hours. With a one-week horizon, you couldn't go very far off track. You can't get a huge amount done in a week either. You need to have a bigger picture in mind that transcends several weeks. We released every couple of months.

On the first Monday of the four-week sprint, we review the sprint backlog and break down the features into finer grained tasks. In the fourth week, we look at the product backlog and prioritize the features to go on to the next sprint's backlog. Features are measured as Small (1 week), Medium (2 weeks), or Large (4 weeks). On the fourth Friday, we have demos. We also estimate our velocity for the next sprint, based on how much we delivered in the current sprint. This determines how much we sign up for at the beginning of the next sprint.

With the four-week sprint, you build up momentum and you have enough time to deliver significant functionality. The planning is harder though.

I prefer the rhythm of a four-week sprint, but I could go back to the shorter one.

Today is the last day of a four-week sprint. We got a lot done, though it came down to the wire yesterday.

27/04/2009   [Link]
SAP .NET RFC Server with SAP.NET Connector 2.0  [click for more...]
This article explains how to connect from SAP to .NET application
27/04/2009   [Link] huseyinakturk
Chapter 10: Document Object Model (DOM): Objects and Collections  [click for more...]
In this chapter you'll learn Use JavaScript and the W3C Document Object Model to create dynamic web pages, the concepts of DOM nodes and DOM trees, to traverse, edit and modify elements in an XHTML document, to change CSS styles dynamically, and to create JavaScript animations.
27/04/2009   [Link] Prentice_Hall
Detect a security exception when using FormsAuthentication  [click for more...]

If you are using the web.config to determine security for aspx pages, you may have noticed that you don’t get the chance to determine whether a security exception has been thrown.  The user will simply be return to the login page with a ReturnUrl query string pointing back to the url they were trying to access.

If you want to show the user a different screen (like an Access Denied screen or something like that), you need to add an HttpModule to the application and add a handler to the EndRequest event.  In there, you can check the Request has been authenticated and if the Response.RedirectLocation points back the login page with a ReturnUrl.

Here is some code for the EndRequest event that should help you out:

void context_EndRequest(object sender, EventArgs e)
{

    HttpContext Context = HttpContext.Current;
    HttpRequest Request = Context.Request;
    HttpResponse Response = Context.Response;

    if (Request.Url.AbsolutePath.EndsWith(".aspx", StringComparison.CurrentCultureIgnoreCase))
    {
        if (Request.IsAuthenticated    
            && ! string.IsNullOrEmpty(Response.RedirectLocation)
            && Response.RedirectLocation.IndexOf("login.aspx?ReturnUrl=", StringComparison.CurrentCultureIgnoreCase) != -1)
        {
            //they are logged in and getting redirected to the login page - this means that they don't have access to something
            Response.RedirectLocation = Response.RedirectLocation.ToLowerInvariant().Replace("login.aspx", "Errors/AccessDenied.aspx");
        }
        
    }
}

 

Hope that helps!

 

more later – joel

27/04/2009   [Link]
IIS RECEIVES TWO PRESTIGIOUS AWARDS  [click for more...]
IIS Application Request Routing is Selected Winner in the Load Balancing Solution Category IIS URL Scan 3.1 is Selected Winner in the Web Filtering Solution Category Even though I stopped receiving sports trophies long ago, it still feels nice to win an award. And what better technology to receive a couple of awards then IIS? Info Security Products Guide, the industry’s leading publication on security-related products and technologies, has named IIS Application Request Routing & IIS URL Scan...(read more)
27/04/2009   [Link]
JSBasic - A BASIC to JavaScript Compiler  [click for more...]
In this C# project, BASIC source code is compiled to JavaScript and run in a browser.
27/04/2009   [Link] Daniel Flower
Silverlight Custom Control - Number Tumbler  [click for more...]
Presents the design and interface considerations together with implementation details for NumberTumbler custom control in Silverlight 3 Beta
27/04/2009   [Link] Modesty Zhang
New Video on ASP.NET  [click for more...]
Chris Pels shows how to add client script events to controls on an ASP.NET page. Watch this and other videos on the Learn page.
27/04/2009   [Link] ASP.NET News
Copyright © 2007 Solentive | Disclaimer | Contact | Home