Friday, January 6, 2012

iPad jQuery restrictions on multiselect drop downs within the parent lable tag

When I feel everything works, there has to be some platform or gadget that has to act up. Today it was the iPad HTML5 rendering with jQuery. I have a five step registration form that was tested and over tested on Windows, Mac, Androids, Kindle Fire and iPad; and only now, it is found to be something that doesn't work. The bug turns out to be "label" tag that encapsulates the select tag's of organization list and on-change update of another select tag below the organization select tag which is address locations of the referring organization. It seems, because the label tag is the parent tag for both selects, it will only allow the drop down of organization list to be selected. The minute the address select is touched, the iPad closes the list of addresses and reopens the list of organization names. It is silly, yet, it may have it's reasons. I have to go back to wizard page and readjust many such label tags which have multiple select tags. I guess today's is one of those days, something you learn every day!

Update 1: I thought I resolved the issue with iPad but it seems the error has it ways of coming back again and again. First the issue was the LABEL tag, now it seems the first option of multi-select will not get selected in iPad. I do not understand why it is not selecting the first option, but it will work if it had more than one option. I wish there was some way to capture the issue.

Thursday, January 5, 2012

Reading up online for SharePoint Exam

What is SharePoint? ​Microsoft SharePoint 2010 makes it easier for people to work together. Using SharePoint 2010, organization staff or members can set up Web sites to share information with others, manage documents from start to finish, and publish reports to help everyone make better decisions. I have decided to take the SharePoint 2010 Exam, and for study purpose, signed up for MicrosoftELearning.com online course and TestKing.com selected preparation exam. After all the lets get started and moving along, strange and sad thing happen, the MicrosoftELearning First Virtual Machine Lab is broken, and I don't feel like moving forward, until I can complete the lab. At the same token, I can't take the TestKing exam until I actually understand what I will be tested on in the exam. Its a sad sad situation as I have a deadline to pass the class by Jan 15th. I don't have any client project waiting in line to meet that deadline, but it's just I have to finish it off by than. I have created a support ticket with eLearning yesterday and so far have not received any feedback. Good or bad, the full MSDN web site library is available free of cost obviously, but if I had the patience to read it all, than I would not have paid MicrosoftELearning for the online course. I am not sure when I may be getting a reply from the support team as it's close to the end of the business day in eastern timezone. Just like the song "Let's pretend" I will get a reply before I come back to work tomorrow.

Wednesday, November 30, 2011

Virtual PC: XP Mode: Windows 7 Password Issue

I had the XP Mode enabled on the pc with Windows 7 Ultimate and installed the additional virtual pc's of windows xp and windows 7 professional for testing. After using Win 7 VPC initially, I did not used it for months and today when I tried to use it again, I was prompted for log-in, after repeated tries with every combination again and again, I am unable to gain access to the virtual pc, even though I had a basic password with a hint. Nothing seems to be working. As it was a virtual pc on my laptop, no one else had access to it to update the password, so it's really annoying to run into this issue. Researching the issue online, seems many people on the XP mode, let it be Windows 7 or Windows XP, have the same issue. After trying few of the solutions, I am still out of luck and it seems like I am running out of options, as none of the forums gives a clear answer, and some have the solution for password recovery tools but that just not the method to solve this issue as the same can happen in the future. If the issue is not resolved, than only best option for me will be to re-install and lose all the software patches and what not installed on the pc. I wish some one figured out why this issue or bug happen at the first place. TechNet: Windows 7 XP mode looses password

Wednesday, June 8, 2011

ASP.Net DotNetNuke Page Header Head/Meta Tags

Adding meta, css and script tag to the header proved to be too much trial and error. And searching online results in no clear solution either.

My custom requirement was for DotNetNuke Module to add css and script tag at page level head tag not inside the body tag.

Here is the simple solution:
In my view.ascx.vb file, I have added a prerender block of script:


Private Sub Page_PreRender(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.PreRender


Try
    Dim htmlHeadTags As String
    Dim htmlHeadCtrl As LiteralControl = New LiteralControl

    htmlHeadTags = "<meta name=""viewport"" content=""initial-scale=1.0, user-scalable=no"" />" _
& "<link href=""http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/themes/flick/jquery-ui.css"" rel=""stylesheet"" type=""text/css""/>" _
& "<link id=""ServiceCenterCSS"" rel=""stylesheet"" type=""text/css"" href=""" & ResolveUrl("~/DesktopModules/ServiceCenter/ServiceCenter.css") & """ />" _
& "<script src=""http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/jquery-ui.js""></script>"

    htmlHeadCtrl.Text = htmlHeadTags

    Dim header As Web.UI.HtmlControls.HtmlHead
    header = TryCast(Me.Page.Header, Web.UI.HtmlControls.HtmlHead)
    If header IsNot Nothing Then
    
    header.Controls.Add(htmlHeadCtrl)
    End If

    Catch exc As Exception 'Module failed to load

        
        ProcessModuleLoadException(Me, exc)
    End Try
End Sub



Note:
  1. I have added script later than style-sheets as its the recommended way for rendering the style-sheets and JavaScript.
  2. Also note that if you need to use the double quotes within the "...", you just use two double quotes to avoid the compilation or error message.

Please add your thoughts if you use similar or better approach to this requirement.

Thanks,
Wasay

Monday, May 9, 2011

DotNetNuke WebFormsMvp.IView error

I am not sure what this error is of DotNetNuke source for visual studio 2010.


Error 4 Class 'ModuleViewBase' must implement 'ReadOnly Property ThrowExceptionIfNoPresenterBound As Boolean' for interface 'WebFormsMvp.IView'. Implementing property must have matching 'ReadOnly' or 'WriteOnly' specifiers. C:\Users\general\svn\DotNetNuke\Build\Trunk\DotNetNuke.Web\Mvp\ModuleViewBase.vb 31 20 DotNetNuke.Web

I tried searching for this error but no solution. I am not sure how this error can be resolved.

Any one has any suggestions?

Update-5/9/2011: I am not sure if by mistake I mixed the source code with C# and VB. The svn is I think C# where as the codeplex source may still be VB and upgrading from one to the other may have resulted in the issue.


I am not 100% sure, but deleted the source and starting from scratch now; glad my custom modules source code is separate. Sad part I have to restart all over again.

Friday, April 29, 2011

Jquery Quick Tabs for DotNetNuke HTML Module

If you want to quickly add tabs solution to your HTML Module than follow the below methods to accomplish it.

I have used the Microsoft Ajax CDN file reference as the following link allows me to choose different color scheme with just changing the UI css file reference.
http://www.asp.net/ajaxlibrary/CDNjQueryUI1812.ashx

In the page settings, under the page meta tag section add the following items. Make sure that the page meta tag takes the entire text and does not trims any part, if the trim or concatenation does happen, than add the remaining (entire tag) portion to the HTML module settings header section.

**********START************
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/themes/ui-lightness/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.5.1.js"></script>
<script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.12/jquery-ui.js"></script>  
<script>
    $(document).ready(function () {
        $("#tabs").tabs();
    });
</script>
**********END************ 

The below div tags will go under the body tag.

**********START************
<div id="tabs">
 <ul>
  <li><a href="#tabs-1"><span>Home</span></a></li>
  <li><a href="#tabs-2"><span>Search</span></a></li>
  <li style="display:none;"><a href="#tabs-3"><span>Details</span></a></li>
 </ul>
 <div id="tabs-1">
            Home level test...
 </div>
 <div id="tabs-2">
            Search options
 </div>
 <div id="tabs-3" style="display:none;">
            You can manipulate this option!
</div>
    </div>
**********END************* 

This will basically enable your page to have tab options. As the HTML module will have the user level permissions, this basically makes it a working solution, without spending money or installing tabs solutions which are too complex or bloated.

As the javascript and CSS are placed under the page meta tag settings, the content contributer or editors will not have to deal with the scripts and css, and if the contributer or the editor did messes up the text, it will not be some complex module vb or c# script but rather the html in the HTML module that you will need to fix to resolve any issues.

Hope it helps to anyone who is looking for a fast solution for dynamic tabs for the dnn solution.

Monday, April 25, 2011

WebRequests to the configured external xml source are not permitted (Medium trust)

I have setup a YouTube XML channel list on my DotNetNuke website and all was working good on the staging site as it was in full trust but production being a shared hosting has a medium trust and now the IFrame and XSL rewrite script and all are useless as the web service to pull the XML from YouTube itself is failing because of the medium trust issue.

Request for the permission of type 'System.Net.WebPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.


WebRequests to the configured external xml source are not permitted (Medium trust)

Anyone has any additional update on how to fix this? without the need of compiling the entire DotNetNuke source code?

Thanks,
Wasay

I looked up these references: