An Example Of The Need To Use Absolute URLs
I have been doing some work around twitter and ASP.NET MVC. The way twitter authentication works, is that I have a page that creates a twitter URL, redirects the user to twitter,
the users accepts to use the application associated with the website, and twitter redirects the user to a callback URL, the completes processing of the user credentials. In order to set a callback URL dynamically (especially in development, when the callback is likely a localhost one), we need to send the absolute URL to twitter.
Other examples might include having a “permanent URL” for some resource (product, blog post, etc..), or maybe a link to be used in emails or so. There can be many usages, so, let’s see how to do it!
How We Did It In Webforms
In webforms, the easiest way to do it was to use the Control.ResolveClientUrl() method.
Typically you pass a URL relative to the current code file (.aspx, .master or .ascx file). and it returns the corresponding absolute URL of that. Of course when the file is a control or a master page file, we don’t always want/have a path relative to this file. The work around for this was passing a relative URL that starts with “~/”. As you probably know, “~/” represents the root of the website.
Read the full post ... (584 words, 3 images, estimated 2:20 mins reading time)
.NET FAQ, ASP.NET, ASP.NET Controls, ASP.NET MVC
the AjaxControlToolkit has a new release, the release includes bug fixes and new HTMLEditor, ComboBox, ColorPicker controls/extenders.
HTML Editor
I liked the HTMLEditor control so much from first sight. Pretty lightweight and customizable. I still need to check whether it works fine inside UpdatePanel and whether it can be used with RequiredFieldValidator or so.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/HTMLEditor/HTMLEditor.aspx
Color Picker
The ColorPicjker is just an extender to TextBox control. This means a lot of opportunities and promises less problems with validators, etc… It’s a very nice one too.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ColorPicker/ColorPicker.aspx
Combo Box
The ComboBox is a control that is like a DropDownList with auto complete except that the user can enter a new text that is NOT in the existing items. This is good or bad based on your sole use.
I did not like how it’s not well styled in the example page. This means it’s going to be headache to style in my sites as well, which is one of the biggest problems with AJAXToolkit in general.
http://www.asp.net/AJAX/AjaxControlToolkit/Samples/ComboBox/ComboBox.aspx
Technorati Tags:
AJAX Toolkit,
AJAXToolkit,
AJAX Control Toolkit,
AJAX Control Tool kit,
AJAXControlToolkit,
HTML Editor,
HTMLEditor,
WYSIWYG,
WYSIWYG Editor,
HTML WYSIWYG,
Color Picker,
ColorPicker,
HTML Color Picker,
HTML ColorPicker,
ComboBox,
Combo Box,
HTML ComboBox,
HTML Combo Box,
Web Combo Box,
Web ComboBox,
News,
Release
Permanent link to this post (203 words, 6 images, estimated 49 secs reading time)
.NET, ASP.NET, ASP.NET Controls, General News, Link List, Microsoft News, Web 2.0
This is problematic with ASP.NET AJAX. The main Script Components are NOT sent to the client when in :Legacy” mode. This is “By design” in ASP.NET AJAX, although it is a clear limitation!!
I’m investigating the problem for other solutions and will be sending an update soon.
Thank you, Iman Halawany, for making me note this. I’ve been working on WCF services and ASP.NET MVC stuff lately than normal webforms, so, didn’t realize this obvious showstopper.
To all my readers, I owe you a BIG apology.
The Problem
ASP.NET validators and ValidationSummary controls are rendered as SPAN tags that are shown and hidden based on validation state. The properties of the validators are written normally via JavaScript calls similar to these:
<script type=“text/javascript”>
//<![CDATA[
var Page_ValidationSummaries = new Array(document.getElementById("vdsSiteLogin"));
Read the full post ... (572 words, 2 images, estimated 2:17 mins reading time)
ASP.NET, ASP.NET 2.0, ASP.NET Controls
If you have ever thought that the famous if(Page_ClientValidate("validationGroup")) {/*JS Code*/} and myValidator.ValidationGroup = "validationGroup"; are sure not enough client side capabilities in ASP.NET validators, you are right.
The list of client side API for ASP.NET Validators can be found on this MSDN page "ASP.NET Validation in Depth":
http://msdn.microsoft.com/en-us/library/aa479045.aspx#aspplusvalid_properties
Look for subtitle: "Client-Side APIs".
Thanks Simone Chiaretta for mentioning the topic, Mohamed Tayseer for sharing the topic on facebook, and Richard Cook for his comment on the post making me search for the complete list.
Permanent link to this post (97 words, 2 images, estimated 23 secs reading time)
ASP.NET, ASP.NET 2.0, ASP.NET Controls
With MIX, and meeting the announced MVC roadmap, the new versions of AS.NET Extensions are now publicly available.ASP.NET MVC Framework Preview 2 is available also as separate download, same as Silverlight 2.0 BETA 1 (and Expression studio, Silverlight VS 2008 Tools).
Download Links:
Additional Resources:
Announcements
Have fun :)
Technorati Tags:
ASP.NET,
ASPNET,
ASP.NET MVC,
MVC,
ASP.NET Extensions,
ASP.NET 3.5 Extensions,
Silverlight,
Silverlight 2.0,
Silverlight BETA,
Expression,
Expression Studio,
Microsoft,
News,
Visual Studio 2008,
IE,
IE8,
IE 8,
Internet Explorer,
Internet Explorer 8
Permanent link to this post (187 words, 2 images, estimated 45 secs reading time)
ASP.NET, ASP.NET Controls, ASP.NET MVC, Link List, Microsoft News, MVC, Silverlight, Visual Studio, Visual Studio 2008 (Orcas)