First, if you have not heard, Microsoft will be shipping jQuery as part of visual studio. And if the swiftness that the .NET team moves I am sure we can see it in a the next SP. Update: Just re-read the article…The jQuery intellisense annotation support will be available as a free web-download in a few weeks…w00t.
jQuery
jQuery is great, its selector engine is by far the simplest and (I think) most powerful component. But, when using jQuery I always seem to be looking for pluggins…widgets…etc.
Microsoft’s Challenge
Even though my current shop uses dojo, which I love too!, I am truly excited by this move. But integrated jQuery is the potential to become another underutilized component in the .NET toolbox. intellisense is great but most DNDD can’t type a lick of JS. Microsoft is going to have to wrap some widgets around this powerful engine.
DNDD: Drag and Drop Developer. Yes it does have a negative condensation.
No related posts.
If, after you followed all the steps at http://msdn.microsoft.com/en-us/library/ms185301(VS.80).aspx you are getting an error about unsigned DLLs…try adding the DLL to the bin folder of your project…
Just re-code the wizard in C#…I guess there is a reason all the examples are in C#…
Related posts:
If the parent container of a dojox.grid.Grid has its style set to text-align:center the rows of the grid, in IE, won’t display their data. The data, of course, is still there and displays correct in everything else.
Code Snip:
1: <h2>Working</h2>
2: <div id="dojoxGrid" dojoType="dojox.Grid" jsId="dojoxGrid" structure="layout"></div>
3: <h2>Not Working (in IE)</h2>
4: <div style="text-align:center;">
5: <div id="dojoxGridError" dojoType="dojox.Grid" jsId="dojoxGridError" structure="layout"></div>
6: </div>
Demo: http://eric.polerecky.com/dojoGrid/
No related posts.
Ok, so maybe I’m doing it wrong..(that’s what she said)…and it would not be the first time.
dojo.byId(‘name’).value fails when using the Html Helper “Html.DropDownList” from ASP.NET MVC PR5 as seen below
1: <%'=Html.DropDownList("", "search_form_filter", ViewData())%>
Er..um…could it just be that dojo.byId does not return the display text when value is not explicitly defined in the dropdown…yeah..that’s probably it.
Related posts:
Anyone know if there is a cleaner way to do this?
1: Private Function MembershipUser_To_DataTable(ByVal vMembershipUser As MembershipUser) As DataTable
2: Dim mDataTable As New DataTable
3: mDataTable.Columns.Add("Email")
4: mDataTable.Columns.Add("PasswordQuestion")
5: mDataTable.Columns.Add("Comment")
6: mDataTable.Columns.Add("IsApproved")
7: mDataTable.Columns.Add("CreateDate")
8: mDataTable.Columns.Add("LastLoginDate")
9: mDataTable.Columns.Add("LastActivityDate")
10: mDataTable.Columns.Add("LastPasswordChangedDate")
11: mDataTable.Columns.Add("UserId")
12: mDataTable.Columns.Add("IsLockedOut")
13: mDataTable.Columns.Add("LastLockoutDate")
14: mDataTable.Rows.Add(vMembershipUser)
15: Return mDataTable
16: End Function
No related posts.
As I was wiring up a project to use SubSonic I ran into a problem with my tables using reserved words.
1: . colvarApplicationId.DefaultSetting = @"(newid())";
If you get the “Character is not valid” error as in the line above..there is a reserved word somewhere in your table
My database only contained the tables required for the .NET Role Provider and one user defined table. After telling SubSonic to only build classes for my table my project compiled at run time using the .abp without issue. I have not done enough testing to verify if there is an incompatibility here or just something funky in my code. I’m currently leaning towards incompatibility because I would never mess-up..er..um..I mean being that its a brand new project
No related posts.
Typing the phrase “naming conventions” makes me feel ill. They have always been someone of an objective topic and a topic that has ALWAYS lead to intense debate. Well, I hope that my little foray into code analysis has lead me to stumble upon a clear concise description for ASP.NET naming conventions.
I ran the new release of FxCop against one of my projects today and came across a few, 1504 to be exact, messages about incorrect naming conventions. Ha!, Like there is a correct way to format your code…wait…what Microsoft thru the error…hmm…maybe someone should check the error description.
Update: The error log is from a clients project, I do not have control over naming standards with this particular client.
Type, namespace, and member identifiers are Pascal-cased.
Parameter identifiers are camel-cased.
Two letter acronyms within these identifiers should be upper-cased, for example, use System.IO instead of System.Io.
Acronyms of three or more letters should be Pascal-cased, for example, use System.Xml instead of System.XML.
The pascal-casing convention capitalizes the first letter of each word, as in BackColor.
The camel-casing convention formats the first letter of the first word in lowercase and capitalizes the first letter of all subsequent words, as in backgroundColor.
Although it may be common practice for some two letter acronyms to not be fully capitalized, violations of this rule should not be excluded for this reason. For example, ‘DbConnection’, is common but incorrect; use DBConnection.
A violation of this rule might be required for compatibility with existing, non-managed symbol schemes. In general, however, these symbols should not be visible outside the assembly that uses them.
No related posts.
Dojo likes to trap events, as such the current way to disable the escape key for dialogs is to use dojo.stopEvent(evt) …
1: dojo.connect(dijit.byId("disclaimer_dialog").containerNode, 'onkeypress', function(evt) {
2: key = evt.keyCode;
3: if (key == dojo.keys.ESCAPE) {
4: console.debug("Escape trapped !!")
5: dojo.stopEvent(evt);
6: }
7: });
I’m starting to feel like there is “the dojo way” and them um…expected way…
Maybe I just missed it but why isn’t there a property for “disableEscape” or “allowEscape” …whatever…it works right…
Related posts:
Html.RenderUserControl has been superceded by Html.RenderPartial
1: <% Html.RenderPartial("~/Views/Shared/MyControl.ascx") %>
2: <% Html.RenderPartial("MyControl") %>
You can specify the full path to your user control as in the first example. Or, if your user control is in the ~/Views/Shared folder, you can use the second example.
Notice that Html.RenderPartial does not produce a return..aka…the = is removed.
Related posts:
One of my largest clients is a forward thinker in terms of web application development. As such it’s a great place to introduce ASP.NET MVC. Surprisingly, it was received, by the Java Gurus with strong MVC roots, with a lukewarm reception. But I digress..ScottGu recently posted a small tidbit about ASP.NET MVC that I think needs a little more highlighting:
Important: If you don’t like the MVC model or don’t find it natural to your style of development, you definitely don’t have to use it. It is a totally optional offering – and does not replace the existing WebForms model. Both WebForms and MVC will be fully supported and enhanced going forward (the next release of ASP.NET WebForms will add richer URL routing features, better HTML markup/client-side ID/CSS support, and more). So if after reading the above post you think "hmm – that doesn’t feel natural to me", then both don’t worry, and don’t feel like you should or need to use it (you don’t).
— ScottGu
No related posts.