New version of Microsoft Office to be released in 2010

by Edward 28 April 2009 07:24

Microsoft's next version of Office will be ready for users from 2010, but though probably not in conjunction with the Windows 7 operating system.

The timing for when it will be available, will differ for big businesses and individual consumers, and also for people who buy packaged software versus those who choose to download it.

Some industry observers had expected the new version of Office to be ready for a 2009 release, but Microsoft CEO Steve Ballmer extinguished that rumour at a meeting with analysts in February.

Microsoft Office 2010 - previously known by code name "Office 14", will include slimmed-down versions of Word, Excel, PowerPoint and OneNote that let people create and edit documents in a Web browser.

Microsoft did not say whether PC users would have a chance to test a more polished beta version before the official release.

Tags: ,

Social Media | Technology

Manually updating the ASP.NET validators

by Edward 17 April 2009 08:56

I had to do something for work where I had to update the way an error message is being used/displayed inside ASP.NET.

The problem is, we cannot access the WebUIValidation.js file from ASP.NET 2.0 onwards. I then changed my thinking to finding a way to override the current way the validators work. In my case I had to change the way they worked, and had to add my own javascript to the current code.

A quick way of changing the validation, is to override ValidatorUpdateDisplay , and this is done by using good old javascript J

I created a separate javascript file, and copied the function from the WebResource.axd file(which is a “wrapper” for the validation javascript inside ASP.NET), and then changed a few lines of code to make the validator behave according to my requirements. I was able to make it behave the same way in IE6, IE7, and Firefox.

Here is an example of how one can override the ValidatorUpdateDisplay javascript function.

//code inside dummyJS.js

function ValidatorUpdateDisplay(val)

        {          

            //alert("Inside ValidatorUpdateDisplay");

            if (typeof(val.display) == "string") {  

                if (val.display == "None") {             

                    return;

                }

                if (val.display == "Dynamic") {

                    val.style.display = val.isvalid ? "none"  : "inline";                   

                    if(val.style.display == "inline")

                    {

 

                    alert("Custom Code Here");

                    //Other custom Dascode functionality here

 

                    }                   

                   return;

                }

            }

        }

 

Tags: , , ,

ASP.NET | Social Media

C# 4.0 - Dynamically Typed Objects

by Edward 10 April 2009 10:22

As we know C# is an OOP language(object-oriented programming) used in the Windows ASP.NET framework, but the current version of C# 3.0 included some capabilities of functional programming to enable LINQ.

In version 4.0 the C# programming language continues to evolve, although this it is inspired by dynamic languages such as Ruby, Perl and Python.

Another paradigm that is driving language design and innovation is concurrency and that is a paradigm that has certainly influenced the development of Visual Studio 2010 and the .NET Framework 4.0.

That brings me to my post for today, where I want to give an overview of one of the new innovations, called “Dynamically Typed Objects”.

Dynamically Typed Objects

Currently in the latest version of C# 3.0 you need to get an instance of a class and then call the Add method on that class to get the sum of two integers. For Example:

Calculator calc = GetCalculator();
int sum = calc.Add(100, 200);


Our code gets all the more interesting if the Calculator class is not statically typed but rather is written in COM, Ruby, Python, or even JavaScript. Even if we knew that the Calculator class is a .NET object but if we don’t know specifically which type it is, then we would have to use reflection to discover attributes about the type at runtime and then dynamically invoke the Add method.

object calc = GetCalculator();
Type type = calc.GetType();
object result = type.InvokeMember(
         "Add",
         BindingFlags.InvokeMethod,
         null,
         new object[] { 100, 200 });
int sum = Convert.ToInt32(result);


With C# 4.0 we would simply write the following code:

dynamic calc = GetCalculator();
int sum = calc.Add(100, 200);


In the above example we are declaring a variable, called calc, whose static type is dynamic. We’ll then be using dynamic method invocation to call the Add method and then dynamic conversion to convert the result of the dynamic invocation to a statically typed integer.

Tags: , , ,

ASP.NET | Technology

About DasCode.Net

I'm a ASP.NET web developer and code enthusiast. Blogging about everything .Net related.

Code... that's .net

Month List