tag:blogger.com,1999:blog-23540357702817409672024-02-19T15:58:37.440-08:00Code4Green BlogHussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.comBlogger46125tag:blogger.com,1999:blog-2354035770281740967.post-33240233320042305672015-06-01T14:54:00.001-07:002015-06-01T14:55:57.523-07:00Sharepoint Visual WebPart - Cannot find web project item in design view<div dir="ltr" style="text-align: left;" trbidi="on">
I was creating a Visual Webpart sometimes back and suddenly all the ascx controls started throwing the following error in design mode in visual studio 2012: "<b>Cannot find web project item in design view '~/sites/Site1/SubSite1A/SubSite1AB/VisualWebPart/VisualWebPart.ascx</b>'."<br />
<br />
My Environment was:<br />
<br />
<ol style="text-align: left;">
<li>SharePoint 2010</li>
<li>Visual Studio 2012</li>
<li>Visual WebPart project</li>
</ol>
<br />
Issue was not that big but impact was very big because I was not able to see controls in design mode. I have got the pointer from the url mentioned in error. Initially my project was created for root site and site url was: "~/sites/Site1/" and later I have changed the site url for my project to "~/sites/Site1/SubSite1A/SubSite1AB".<br />
Changing the URL was the culprit for showing this issue, because changing the site url in "<b>project setting"</b> is not changing its original value stored at <sharepointsiteurl> element in projectName.csproj file:</sharepointsiteurl><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2Im8ZDOKbftS7GWXi2fmLvP3yzl0H4YlPL9UpZigsaW74MbTSeTynFaT2NADiyy8IhGaRIJ9nyGDQGq52KPdiinsLnksFPgQAP7zTDnm9Sq1Vthvawq09qFrFk7uzSvmvykUp-a5x1BC/s1600/cannot+find+web+items.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="88" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhP2Im8ZDOKbftS7GWXi2fmLvP3yzl0H4YlPL9UpZigsaW74MbTSeTynFaT2NADiyy8IhGaRIJ9nyGDQGq52KPdiinsLnksFPgQAP7zTDnm9Sq1Vthvawq09qFrFk7uzSvmvykUp-a5x1BC/s400/cannot+find+web+items.png" width="400" /></a></div>
<br />
If you are getting the same issue then change back site url to its original url as per your <sharepointsiteurl> or change the url value in in .csproj file for <sharepointsiteurl> element to make it work...After changing the site url back to original,Save project and restart your visual studio.</sharepointsiteurl></sharepointsiteurl><br />
<br />
<b><span style="color: #274e13;">Enjoy Green Coding</span></b></div>
Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-55124908703983283092013-07-19T13:36:00.000-07:002013-07-19T13:36:17.267-07:00Sharepoint Master Pages<div dir="ltr" style="text-align: left;" trbidi="on">
<div>
I have seen that most of the time, sharepoint professionals are facing hard time to deal with master page and branding in sharepoint. So, I have decided to write easy ways to deal with master pages. Here is my first blog over sharepoint branding. Please do the following steps to create a master page from existing:</div>
<br />
<div>
1. Open the site into windows explorer </div>
<br />
<div>
2. copy and paste a master page in masterPages folder. Rename the copied one. </div>
<br />
<div>
3. copy and rename css file from style folder(see the css path in master page's html)</div>
<br />
<div>
4. copy all the images and paste into a new image folder(see the image path in master page's html). Change the images according to your branding.</div>
<br />
<div>
5. change the image folder's in image's source in master page's html</div>
<br />
<div>
6. Save checkin</div>
<br />
<div>
7. publish</div>
<br />
<div>
Now your Master page is ready to use.</div>
<br />
<div>
Go to the site properties and click on master page under look and feel section. select your master page for "site master page" and "system master page" .</div>
<br />
<div>
Go back to home page of your website, you will have a new look according to your master page.</div>
<br />
<div>
Happy Green Coding !!!</div>
</div>
Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-23851096068349059422013-05-19T06:33:00.000-07:002013-05-19T06:33:00.386-07:00Which one is my future: ASP Web form, MVC, HTML5, or WebAPI for Web Architect/Developer? <div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Why client-side techniques such as JQuery, Knockout, HTML5, etc.are becoming so popular? They all are having one thing in common: <b><u>usage of WebAPI</u></b>.<br />
Nowadays not only the simple websites, but also big enterprise level applications are using WebAPI to designs their high traffic websites. I was a part of a design and development team of a Airport site, it was designed and developed in SharePoint 2010. It was having 50% custom code and most of them were having webparts. each webpart was getting the data from Database(I will not disclose the name of DB). Data retrial and transactions all were done using the webAPI.<br />
I have gone through a very good article by a co-founder of DNN Shaun Walker, he has explained the future of web development in microsoft technologies, like Asp.net. Please go through this blog and see what exactly changes he is planning for the DNN using this wave of change in Microsoft technology.<br />
<br />
<h2 id="dnn_ctr2612_MainView_ViewEntry_lblBlogTitle" style="background-color: white; border-bottom-color: rgb(214, 214, 214); border-bottom-style: solid; border-width: 0px 0px 1px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 15px; font-weight: normal; line-height: 36px; margin: 0px 0px 10px; padding: 0px 0px 5px; vertical-align: baseline;">
<a href="http://www.dotnetnuke.com/Resources/Blogs/EntryId/3408/Microsoft-Declares-the-Future-of-ASP-NET-is-Web-API.aspx">Microsoft Declares the Future of ASP.NET is Web API</a></h2>
<br />
Enjoy your green coding and try to use more <a href="http://www.code4green.com/">code4green.com</a> to generate more plants on this earth.<br />
<span style="color: #274e13; font-size: x-small;"><i>Try to use handmade bags to bring your home goods in daily life, it will really make a big change in environment.</i></span><br />
<br />
<div>
<br /></div>
</div>
Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-28132245716229605982012-07-22T18:34:00.000-07:002012-07-22T18:53:56.148-07:00Important Law's of Computer or IT Industry<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<h2 style="text-align: left;">
Parkinson’s Laws: </h2>
<u><b>1st law</b></u>:<br />
"Work expands to fill the time available"<br />
or<br />
"Data expands to fill the space available for storage."<br />
<u><b>2nd law</b></u>:<br />
Expenditures rise to meet income<br />
<br />
<h2 style="text-align: left;">
Wirth's law:</h2>
"Software gets slower faster than hardware gets faster".<br />
<h2 style="text-align: left;">
Moore's law</h2>
(Intel's co-founder Gordon Moore)
the number of transistors on integrated circuits doubles approximately every two years. The period often quoted as "18 months"
According to "2010 update to the International Technology" Roadmap for Semiconductors has growth slowing at the end of 2013, and after 2013 "time transistor counts and densities" are to double only every 3 years not 18 months<br />
<br />
<br />
Last but not least, a very important rule for project management: <span id="internal-source-marker_0.7494119323647698" style="background-color: transparent; color: black; font-family: 'Times New Roman'; font-size: 16px; font-style: italic; font-variant: normal; font-weight: bold; text-decoration: none; vertical-align: baseline;">You can't control what you can't measure.</span> </div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-24500457558987294392012-06-26T20:39:00.000-07:002012-06-26T20:39:17.359-07:00How to Use VSS in Visual Studio 2010?<div dir="ltr" style="text-align: left;" trbidi="on">
I have been asked this question many times, so I thought I can write down a blog on this topic.<br />
<u><b>Question</b></u>: <i><b>How can I use VSS(not TFS) in Visual studio 2010?</b></i><br />
<u><b>Solution</b></u>: Please follow these steps to use VSS in Visual Studio 2010:<br />
<u><b>Step-1</b></u>. Go to Tool and Option<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPtYW4vL4P35ZjIVyigGH2Jp37iqI-6vQQVhViBZMyFj9naQBTUtjQo8c-6JH4WmuAJRT5j5WXgQ0tHBXs23fU5ALqtVbGin4tOYErIKnD9_auFgkEO9PxF1Y_WFDmzfXQLo7ugblolFKV/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPtYW4vL4P35ZjIVyigGH2Jp37iqI-6vQQVhViBZMyFj9naQBTUtjQo8c-6JH4WmuAJRT5j5WXgQ0tHBXs23fU5ALqtVbGin4tOYErIKnD9_auFgkEO9PxF1Y_WFDmzfXQLo7ugblolFKV/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step1.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<u><b>Step-2</b></u>.In Option select Source Control(see 2.1 in image). Then Select VSS from dropdown Source Control PlugIn. Click OK.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg0iA6-lfliavMhHzSsOKAMcp3XfEA9YwlGIc4MrQ5kVJI36TlP_hFbAv9yCph5UTQRQRIxdGNbMym12qFTSTKDcv2FwBhhOKLdyBBuVWE_wcOErKIzdoIM6sTNeHcxYvoHikGBIvtn6Xt/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgg0iA6-lfliavMhHzSsOKAMcp3XfEA9YwlGIc4MrQ5kVJI36TlP_hFbAv9yCph5UTQRQRIxdGNbMym12qFTSTKDcv2FwBhhOKLdyBBuVWE_wcOErKIzdoIM6sTNeHcxYvoHikGBIvtn6Xt/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step2.png" /></a></div>
<br />
<br />
<br />
<br />
<u><b>Step-3</b></u>. In VS2010, open a solution. Right click on solution(3.1) and then select "Add solution to source control".(see 3.2 in image).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlB1OUSIIkihuT-6u3C9xUvU0hUeEBbQMrLsLIOkNj_ONJF2yn4znBRXh25iOWih_1AISvpHE3TEUe1yDZhU6oZQdG9b_47mPVu2jK_n-DmwnepQDKAzV9uA-QuNQz7LKXqXIiwCcN-L7f/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlB1OUSIIkihuT-6u3C9xUvU0hUeEBbQMrLsLIOkNj_ONJF2yn4znBRXh25iOWih_1AISvpHE3TEUe1yDZhU6oZQdG9b_47mPVu2jK_n-DmwnepQDKAzV9uA-QuNQz7LKXqXIiwCcN-L7f/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step3.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<u><b>Step-4</b></u>. Select database for sourcesafe and it will add the solution in VSS<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK6gjg3WBgpvdqMNGUrEDihRSLUxWMQNMwxFt8Ign6SVq5IHfOERKpkKN0GtDbmWtepzsrEleR7waRaC3S_TTSa60Xqkt81iB5cmhjcrZ_viwnMaJ0tKnbvGs3RL16goOfTjZT7Bml5Rzn/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK6gjg3WBgpvdqMNGUrEDihRSLUxWMQNMwxFt8Ign6SVq5IHfOERKpkKN0GtDbmWtepzsrEleR7waRaC3S_TTSa60Xqkt81iB5cmhjcrZ_viwnMaJ0tKnbvGs3RL16goOfTjZT7Bml5Rzn/s1600/Code4Green-HowToUseVSSinVisualStudio2010-Step4.png" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
I hope it will help you. Enjoy green coding at www.code4green.com</div>
<div style="text-align: left;">
<br /></div>
</div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-28194828288553253112012-05-23T14:59:00.000-07:002012-05-23T14:59:10.854-07:00Enum comparison Sample<div dir="ltr" style="text-align: left;" trbidi="on">
<!--[if gte mso 9]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:View>Normal</w:View>
<w:Zoom>0</w:Zoom>
<w:TrackMoves/>
<w:TrackFormatting/>
<w:PunctuationKerning/>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:DoNotPromoteQF/>
<w:LidThemeOther>EN-US</w:LidThemeOther>
<w:LidThemeAsian>X-NONE</w:LidThemeAsian>
<w:LidThemeComplexScript>X-NONE</w:LidThemeComplexScript>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
<w:DontGrowAutofit/>
<w:SplitPgBreakAndParaMark/>
<w:EnableOpenTypeKerning/>
<w:DontFlipMirrorIndents/>
<w:OverrideTableStyleHps/>
</w:Compatibility>
<m:mathPr>
<m:mathFont m:val="Cambria Math"/>
<m:brkBin m:val="before"/>
<m:brkBinSub m:val="--"/>
<m:smallFrac m:val="off"/>
<m:dispDef/>
<m:lMargin m:val="0"/>
<m:rMargin m:val="0"/>
<m:defJc m:val="centerGroup"/>
<m:wrapIndent m:val="1440"/>
<m:intLim m:val="subSup"/>
<m:naryLim m:val="undOvr"/>
</m:mathPr></w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" DefUnhideWhenUsed="true"
DefSemiHidden="true" DefQFormat="false" DefPriority="99"
LatentStyleCount="267">
<w:LsdException Locked="false" Priority="0" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Normal"/>
<w:LsdException Locked="false" Priority="9" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="heading 1"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 2"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 3"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 4"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 5"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 6"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 7"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 8"/>
<w:LsdException Locked="false" Priority="9" QFormat="true" Name="heading 9"/>
<w:LsdException Locked="false" Priority="39" Name="toc 1"/>
<w:LsdException Locked="false" Priority="39" Name="toc 2"/>
<w:LsdException Locked="false" Priority="39" Name="toc 3"/>
<w:LsdException Locked="false" Priority="39" Name="toc 4"/>
<w:LsdException Locked="false" Priority="39" Name="toc 5"/>
<w:LsdException Locked="false" Priority="39" Name="toc 6"/>
<w:LsdException Locked="false" Priority="39" Name="toc 7"/>
<w:LsdException Locked="false" Priority="39" Name="toc 8"/>
<w:LsdException Locked="false" Priority="39" Name="toc 9"/>
<w:LsdException Locked="false" Priority="35" QFormat="true" Name="caption"/>
<w:LsdException Locked="false" Priority="10" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Title"/>
<w:LsdException Locked="false" Priority="1" Name="Default Paragraph Font"/>
<w:LsdException Locked="false" Priority="11" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtitle"/>
<w:LsdException Locked="false" Priority="22" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Strong"/>
<w:LsdException Locked="false" Priority="20" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Emphasis"/>
<w:LsdException Locked="false" Priority="59" SemiHidden="false"
UnhideWhenUsed="false" Name="Table Grid"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Placeholder Text"/>
<w:LsdException Locked="false" Priority="1" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="No Spacing"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 1"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 1"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 1"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 1"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 1"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 1"/>
<w:LsdException Locked="false" UnhideWhenUsed="false" Name="Revision"/>
<w:LsdException Locked="false" Priority="34" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="List Paragraph"/>
<w:LsdException Locked="false" Priority="29" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Quote"/>
<w:LsdException Locked="false" Priority="30" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Quote"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 1"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 1"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 1"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 1"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 1"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 1"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 1"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 1"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 2"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 2"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 2"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 2"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 2"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 2"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 2"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 2"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 2"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 2"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 2"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 2"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 2"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 2"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 3"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 3"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 3"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 3"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 3"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 3"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 3"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 3"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 3"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 3"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 3"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 3"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 3"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 3"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 4"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 4"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 4"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 4"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 4"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 4"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 4"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 4"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 4"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 4"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 4"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 4"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 4"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 4"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 5"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 5"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 5"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 5"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 5"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 5"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 5"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 5"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 5"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 5"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 5"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 5"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 5"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 5"/>
<w:LsdException Locked="false" Priority="60" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Shading Accent 6"/>
<w:LsdException Locked="false" Priority="61" SemiHidden="false"
UnhideWhenUsed="false" Name="Light List Accent 6"/>
<w:LsdException Locked="false" Priority="62" SemiHidden="false"
UnhideWhenUsed="false" Name="Light Grid Accent 6"/>
<w:LsdException Locked="false" Priority="63" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 1 Accent 6"/>
<w:LsdException Locked="false" Priority="64" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Shading 2 Accent 6"/>
<w:LsdException Locked="false" Priority="65" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 1 Accent 6"/>
<w:LsdException Locked="false" Priority="66" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium List 2 Accent 6"/>
<w:LsdException Locked="false" Priority="67" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 1 Accent 6"/>
<w:LsdException Locked="false" Priority="68" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 2 Accent 6"/>
<w:LsdException Locked="false" Priority="69" SemiHidden="false"
UnhideWhenUsed="false" Name="Medium Grid 3 Accent 6"/>
<w:LsdException Locked="false" Priority="70" SemiHidden="false"
UnhideWhenUsed="false" Name="Dark List Accent 6"/>
<w:LsdException Locked="false" Priority="71" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Shading Accent 6"/>
<w:LsdException Locked="false" Priority="72" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful List Accent 6"/>
<w:LsdException Locked="false" Priority="73" SemiHidden="false"
UnhideWhenUsed="false" Name="Colorful Grid Accent 6"/>
<w:LsdException Locked="false" Priority="19" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Emphasis"/>
<w:LsdException Locked="false" Priority="21" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Emphasis"/>
<w:LsdException Locked="false" Priority="31" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Subtle Reference"/>
<w:LsdException Locked="false" Priority="32" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Intense Reference"/>
<w:LsdException Locked="false" Priority="33" SemiHidden="false"
UnhideWhenUsed="false" QFormat="true" Name="Book Title"/>
<w:LsdException Locked="false" Priority="37" Name="Bibliography"/>
<w:LsdException Locked="false" Priority="39" QFormat="true" Name="TOC Heading"/>
</w:LatentStyles>
</xml><![endif]--><!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin-top:0in;
mso-para-margin-right:0in;
mso-para-margin-bottom:10.0pt;
mso-para-margin-left:0in;
line-height:115%;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
</style>
<![endif]-->
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;">Here is the sample for using enum for comparison with numeric value. See the highlighted lines for using a enum comparison in switch case:</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;">you can use this aspx page's code behind file to test in your aspx page, for this you have to make the following changes </span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;"><b style="color: blue;">Inherits </b></span></span><span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;">in aspx page:</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;"><%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestPage.aspx.cs" <b style="color: blue;">Inherits</b>="<u style="color: blue;"><b>Code4Green.FreeCodeGenerationTool.TestPage</b></u>" %></span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<br /></div>
<h2 class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;"><span style="color: blue; font-size: x-large;">SAMPLE</span> </span></span></h2>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt; text-align: left;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;"><span style="color: black;"> </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: 0.0001pt;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="font-family: Consolas; font-size: 9.5pt;"> System;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">using</span><span style="font-family: Consolas; font-size: 9.5pt;"> System.Web.UI.HtmlControls;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: Consolas; font-size: 9.5pt;">namespace</span><span style="font-family: Consolas; font-size: 9.5pt;"> Code4Green.FreeCodeGenerationTool</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;">{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">public</span> <span style="color: blue;">partial</span> <span style="color: blue;">class</span> <span style="color: #2b91af;">TestPage</span> :
System.Web.UI.<span style="color: #2b91af;">Page</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">public</span> <span style="color: blue;">enum</span> <span style="color: #2b91af;">FilterByDoctorType</span> </span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>General,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>Dental,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>Orthopadic,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>ENT,</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>Cancer</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">protected</span> <span style="color: blue;">void</span>
Page_Load(<span style="color: blue;">object</span> sender, <span style="color: #2b91af;">EventArgs</span> e)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">if</span> (!IsPostBack)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">this</span>.Controls.Add(CreateDoctorContextControls(0,111011));</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">this</span>.Controls.Add(CreateDoctorContextControls(1,
111011));</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">this</span>.Controls.Add(CreateDoctorContextControls(2,
111011));</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">this</span>.Controls.Add(CreateDoctorContextControls(3,
111011));</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">this</span>.Controls.Add(CreateDoctorContextControls(4,
111011));</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">private</span> <span style="color: #2b91af;">HtmlGenericControl</span>
CreateDoctorContextControls(<span style="color: blue;">int</span> filterByValue, <span style="color: blue;">int</span> doctorId)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">HtmlGenericControl</span> htmlStudentListItemControl = <span style="color: blue;">new</span> <span style="color: #2b91af;">HtmlGenericControl</span>();</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><b style="background-color: yellow;"><span style="color: blue;">switch</span> (filterByValue)</b></span></div>
<div class="MsoNormal" style="background-color: yellow; line-height: normal; margin-bottom: 0.0001pt;">
<b><span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></b></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="background-color: yellow; color: blue;">case</span><span style="background-color: yellow;"> ((</span><span style="background-color: yellow; color: blue;">int</span><span style="background-color: yellow;">)</span><span style="background-color: yellow; color: #2b91af;">FilterByDoctorType</span><span style="background-color: yellow;">.General):</span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"General Physician. "</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">case</span> ((<span style="color: blue;">int</span>)<span style="color: #2b91af;">FilterByDoctorType</span>.Dental):</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"Dental Surgon. "</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">case</span> ((<span style="color: blue;">int</span>)<span style="color: #2b91af;">FilterByDoctorType</span>.ENT):</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"ENT Specialist. "</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">case</span> ((<span style="color: blue;">int</span>)<span style="color: #2b91af;">FilterByDoctorType</span>.Orthopadic):</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"Orthopadic surgon. "</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">case</span> ((<span style="color: blue;">int</span>)<span style="color: #2b91af;">FilterByDoctorType</span>.Cancer):</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"Cancer Specialist. "</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span><span style="color: blue;">default</span>:</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>htmlStudentListItemControl = CreateYourWebControl(doctorId,<span style="color: #a31515;">"General Physician"</span>); <span style="color: blue;">break</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">return</span> htmlStudentListItemControl;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">private</span> <span style="color: #2b91af;">HtmlGenericControl</span>
CreateYourWebControl(<span style="color: blue;">int</span> doctorId,<span style="color: blue;">string</span> yourText)</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>{</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">HtmlGenericControl</span> divControl = <span style="color: blue;">new</span> <span style="color: #2b91af;">HtmlGenericControl</span>(<span style="color: #a31515;">"div"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">HtmlGenericControl</span> hyperlinkControl = <span style="color: blue;">new</span> <span style="color: #2b91af;">HtmlGenericControl</span>(<span style="color: #a31515;">"a"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>hyperlinkControl.Attributes.Add(<span style="color: #a31515;">"href"</span>,
<span style="color: #a31515;">"http://www.code4green.com"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>hyperlinkControl.Attributes.Add(<span style="color: #a31515;">"class"</span>,
<span style="color: #a31515;">"yourCSS.Class"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>hyperlinkControl.Attributes.Add(<span style="color: #a31515;">"title"</span>,
<span style="color: #a31515;">"Plant a free tree by using code4green
website"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>hyperlinkControl.InnerText = <span style="color: #a31515;">"goto
code4green website"</span>;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: #2b91af;">HtmlGenericControl</span> spanControl = <span style="color: blue;">new</span> <span style="color: #2b91af;">HtmlGenericControl</span>(<span style="color: #a31515;">"span"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>spanControl.Attributes.Add(<span style="color: #a31515;">"class"</span>,
<span style="color: #a31515;">"MySpanClass"</span>);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>spanControl.InnerText =yourText;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>divControl.Controls.Add(spanControl);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;">
</span>divControl.Controls.Add(hyperlinkControl);</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="mso-spacerun: yes;"> </span></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span><span style="color: blue;">return</span> divControl;</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;"><span style="mso-spacerun: yes;"> </span>}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: Consolas; font-size: 9.5pt;">}</span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0in; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal">
<br /></div>
</div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-28330206867094729552012-04-25T14:56:00.000-07:002012-04-25T15:01:45.026-07:00SkyDrive War - MS, Google, and DropBox<div dir="ltr" style="text-align: left;" trbidi="on">
Are you ready for SkyDrive war? Google has launched GoogleDrive(same as MS's SkyDrive) too. Now there are three major player in the market(cloud based market). Microsoft, Google, and DropBox. The major difference is data storage. Microsoft is giving 25GB+unlimited MS office docs+unlimited photos, while Google is just giving 5 GB space(for extra space you have to pay $2.49 per month for 25 GB).<br />
Another big difference is declaimer. Google declaimer is saying that google will have rights on your documents, while Microsoft and Dropbox are not claiming your documents.<br />
<span style="font-size: large;"><b>If you are already a member of existing SkyDrive users than go to <a href="https://skydrive.live.com/ManageStorage" target="_blank">SkyDrive website</a> and claim your free 25 GB.</b></span><br />
<a href="http://windows.microsoft.com/en-US/skydrive/compare">Here you can see the comparison between cloud based storage drives</a><br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFLtI1s3d9tjR3_A2pHdmy357KPkrzPzjm8uCCvm8PGWCIfygNStTmVnhTOn4qjfbvsdPhAgdKIDyCuIho-JkEHLHpid480Y8hR5Z2IxVVUSdns0r5r8WGqno0F8ykt2U16ae8x44_Ke-U/s1600/Compare+SkyDrive.png" imageanchor="1" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img alt="Compare SkyDrive" border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFLtI1s3d9tjR3_A2pHdmy357KPkrzPzjm8uCCvm8PGWCIfygNStTmVnhTOn4qjfbvsdPhAgdKIDyCuIho-JkEHLHpid480Y8hR5Z2IxVVUSdns0r5r8WGqno0F8ykt2U16ae8x44_Ke-U/s400/Compare+SkyDrive.png" title="Compare SkyDrive" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Generate Green Code Using Code4Green.com</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFLtI1s3d9tjR3_A2pHdmy357KPkrzPzjm8uCCvm8PGWCIfygNStTmVnhTOn4qjfbvsdPhAgdKIDyCuIho-JkEHLHpid480Y8hR5Z2IxVVUSdns0r5r8WGqno0F8ykt2U16ae8x44_Ke-U/s1600/Compare+SkyDrive.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<br /></div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-61163334291521380332012-04-19T20:53:00.010-07:002012-05-31T22:56:24.186-07:00How To Clean Infected site or SQL INJECTION "<script src=http://hgbyju.com/r.php>"<div dir="ltr" style="text-align: left;" trbidi="on">
If your site has been hacked and your web pages are opening some
website that mean your website has been hacked. There are two kind of
possible injections your site may have:<br />
<ul>
<li><span style="font-style: italic; font-weight: bold;"><span style="color: #660000;">File injection:</span> </span>Your
web files like html pages/javascript/css may have virus, than check
your pages: you will found the this type code added at the end of each
page's html: "".</li>
<li><span style="font-style: italic; font-weight: bold;"><span style="color: #990000;">SQL Injection</span>: </span>If
you have a content management system than your content database is
hacked using sql injection. Please see your table/file where you are
keeping your page's content(like product info, page info, menu info,
header info, footer info). You will found that each row of your table
is being and following text has been added at the end of each records:</li>
</ul>
<span style="font-size: 130%;"><span style="font-weight: bold;">Resolution: </span></span><span style="font-size: 130%;"><br /></span><br />
<ul>
<li><span style="font-size: 85%;">For your web files, you have to check all </span><span style="font-size: 85%;">your </span><span style="font-size: 85%;"> files and fix manually one by one.</span></li>
<li><span style="font-size: 85%;">For content database, you can run the following update SQL query to fix:</span></li>
</ul>
<span style="font-size: 130%;"><span style="font-size: 85%;">SET [ItemName] = Replace(cast([ImageName] as nvarchar(100)), '<title&&rt;<script src=http://', '') </span></span><br />
<span style="font-size: 130%;"><span style="font-size: 85%;">Please modify this query and replace your table name, column name for the bold letters in query.</span></span><br />
<span style="font-size: 130%; font-weight: bold;"><span style="font-size: 85%;"><br />Other ways to fix this issues:</span></span><br />
<ul>
<li><span style="font-size: 130%;"><span style="font-size: 85%;">Remove query string</span></span></li>
<li><span style="font-size: 130%;"><span style="font-size: 85%;">Do
not use in-line sql statement in your server side script (like select *
from table where id=' + request.quesrystring(id) or value from query
string)</span></span></li>
<li><span style="font-size: 130%;"><span style="font-size: 85%;">Check
the length of id in query string, if it is more than 20 chars than it
is most likely infected. Quick fix trim id to 20 characters, so it will
remove that malicious string and than it will not work.</span></span></li>
</ul>
<span style="font-size: 130%;"><span style="font-size: 85%;"><br />I hope this will help someone to make their day and to over come of this nightmare.<br /><br />I have fixed many infected content databases using this SQL in sql server/access db. I hope it will help you too.</span><span style="font-weight: bold;">FYI: url(</span></span><span style="font-size: 130%;"><span style="font-weight: bold;">http://hgbyju.com/r.php)</span></span><span style="font-size: 130%;"><span style="font-weight: bold;"> in infected script may be changed in your case. so replace </span></span><span style="font-size: 130%;"><span style="font-weight: bold;">http://hgbyju.com/r.php to your url.<br /><br /><span style="color: #003300; font-size: 180%;">Please don't forget 22 April "Earth day", do something to protect our mother earth"</span></span><span style="font-size: 130%; font-style: italic;"><span style="color: #003300;"><span style="color: #cc0000;">Use code4green for your code generation.</span></span></span><span style="font-weight: bold;"><span style="color: #003300; font-size: 180%;"><br /></span></span></span></div>
Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-19232506746416670142012-04-04T10:42:00.009-07:002012-04-04T11:11:52.538-07:00Window 8 - Metro Style Apps, A big market to make moneyI am seating here in (Fairmont PacificRim center) for windows 8 development training (Windows App development for phone, tablets, laptops) . Here I have got a interesting numbers for Windows OS which is a great opportunity to make money with windows app market.<br />You can make one app which will run on desktop, laptop, Tablet, smartphone.<br />Here is the number of devices for windows OS:<br /><span style="font-weight: bold;">Windows OS - 500 Million devices</span><br />Android - 232 million devices<br />iPhone - 152 million devices<br />Mac OS - 30 million devices<br />If you think 0.01% pie of this Windows device than you can calculate the amount you can make with $0.99/App. With 01 app of $0.99, you can make 1/2 million dollars. This is not impossible :), so go for it.<br /><br />So if you make an Windows app using windows 8 OS with Visual studio 2011, it is easy to make such apps and it is also easy to submit on Windows App store using Visual studio.<br />The only thing you need is one time registration fees with windows app store, which is $49.00 dollar - individual, and $99.00 for Business.Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-40832202623336631852012-03-05T23:50:00.005-08:002012-03-06T00:07:35.826-08:00What is LightSwitch 2011 - Quickview of LightSwitch<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUYYvPnV3jwXz-mhCz3TWket81f8PmSom04HMaPt8XazllkceqGPwv4YMQaM9Jx03Pcp3wfkLh7TMpCLUih65Qrg-HiuHuQNH3QEKATVLisOebf4IKF7xNTznrqRZxMuOXYHAyPCBpBT4o/s1600/LightSwitch.png"><img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 169px;" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUYYvPnV3jwXz-mhCz3TWket81f8PmSom04HMaPt8XazllkceqGPwv4YMQaM9Jx03Pcp3wfkLh7TMpCLUih65Qrg-HiuHuQNH3QEKATVLisOebf4IKF7xNTznrqRZxMuOXYHAyPCBpBT4o/s400/LightSwitch.png" alt="" id="BLOGGER_PHOTO_ID_5716689705357759554" border="0" /></a><br />It is a tool which built applications which are built on classic three-tier architecture, on top of existing .NET technologies.<br />It is a combination of GUI Layer + Business Logic Layer + DB Layer<br /><br />GUI - Silver light, which workd for windows or web.<br />Business Logic Layer - ASP.net WCF service or OData<br />DB Layer - SQL Server, SQL Azure, Sharepoint<br /><br />According to the Microsoft <br style="font-style: italic;"><span style="font-style: italic;">"The LightSwitch presentation tier is a Silverlight application. It can run as a Windows desktop application or hosted in a browser. The LightSwitch logic tier exposes a set of WCF RIA DomainServices running in ASP.NET. The logic tier process can be hosted locally (on the user’s machine), on an IIS server, or in Windows Azure. A LightSwitch application’s primary application storage uses SQL Server or SQL Azure and can consume data from existing SharePoint 2010 lists, databases accessible via an Entity Framework provider, and custom build WCF RIA DomainServices.</span><br style="font-style: italic;"><br style="font-style: italic;"><span style="font-style: italic;">With LightSwitch, your application can point to an existing data source—or databases that are automatically created—without the need to write code. For the user interface, LightSwitch provides screens that are based on predefined templates. They allow you to display data automatically by simply specifying which elements you want to show.</span><p><span style="font-style: italic;">For the business logic, LightSwitch allows you to do simple validation such as required fields and minimum numeric values. But LightSwitch also gives developers the ability to write more complex business logic code for such scenarios as saving changes to a data source or performing authorization operations."</span><br /></p>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com1tag:blogger.com,1999:blog-2354035770281740967.post-43593346015628432812012-02-21T19:23:00.004-08:002012-02-21T19:42:56.555-08:00Codename for Sharepoint 2013 is releasedCodename of Sharepoint 2013 is released on 1 Feb 2012. According to PJ Hough (CVP of Development, MS Office Division) - Codename of Sharepoint 2013 and Office 2013 is "Office 15".<br />PJ Hough is also said about this release: <em>"First time ever, we will simultaneously update our cloud services, servers, and mobile and PC clients for Office, Office 365, Exchange, SharePoint, Lync, Project and Visio".</em><br />Here are some key features of "Office 2015": It is a true 64-bit version, a truly touch-enabled Office, "Ribbon" getting replaced by <a href="http://blogs.msdn.com/b/b8/archive/2011/09/14/metro-style-web-browsing-one-engine-two-experiences-no-compromises.aspx">"Metro" </a>style browsing , and It need to support ARM processors(ARM is the industry's leading provider of 32-bit embedded microprocessors).<br /><br />Important links for more info on Sharepoint 2013/office 2015: <a href="http://aarohblah.blogspot.com/2012/02/sharepoint-vnext.html">http://aarohblah.blogspot.com/2012/02/sharepoint-vnext.html</a><br /><a href="http://www.sharepointblog.co.uk/2012/02/sharepoint-15-what-do-we-know-so-far.html">http://www.sharepointblog.co.uk/2012/02/sharepoint-15-what-do-we-know-so-far.html</a><br /><a href="http://www.sharepointblog.co.uk/2012/01/office-15-technical-preview-begins.html">http://www.sharepointblog.co.uk/2012/01/office-15-technical-preview-begins.html</a><br /><a href="http://betanews.com/2012/01/30/microsoft-reinvents-office-for-the-post-pc-era/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed+-+bn+-+Betanews+Full+Content+Feed+-+BN&utm_content=Google+Reader">http://betanews.com/2012/01/30/microsoft-reinvents-office-for-the-post-pc-era/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed+-+bn+-+Betanews+Full+Content+Feed+-+BN&utm_content=Google+Reader</a>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-31052637414189727522012-02-13T11:14:00.000-08:002012-02-13T11:18:24.093-08:00Components of CMDUI.xml or Definition of CMDUI.xmlHere is the list of main <span style="font-weight: bold;">components of CMDUI.xml</span>:<br /><br />1. <span style="font-weight: bold;">Tab</span><br /><br />2. <span style="font-weight: bold;">Group</span><br /><br />3. <span style="font-weight: bold;">Control</span><br /><br />4. <span style="font-weight: bold;">Contextual tab group</span><br /><br />The next few sections briefly explain these components and their uses.<br /><span style="font-weight: bold;">Tabs on the SharePoint 2010 Server Ribbon</span><br />Tabs: are the root of the Server ribbon. They contain one or more groups, and contain similar functions.<br /><br /><span style="font-weight: bold;">Groups on the SharePoint 2010 Server Ribbon</span><br />Every tab in the ribbon contains a series of one or more groups. Groups are used to associate controls with similar functionality. Each group is associated with a template that defines the layout of the group and how the group should appear based on the scale of the ribbon. The scale of the ribbon refers to situations where there are too many controls to show in the ribbon, for example, when the browser is not in a full-screen maximized state and is in a windowed state.<br />Group Templates on the SharePoint 2010 Server Ribbon<br /><br />Group templates are used to define the different layout options for the controls within a group. Microsoft includes 29 group templates in the CMDUI.xml file (to locate them, search for the element at the end of this file).<br /><br /><span style="font-weight: bold;">Controls on the SharePoint 2010 Server Ribbon:</span><br />The ribbon would not be complete if users did not have anything to select or click. Controls are the items that live inside the ribbon that users can interact with. Controls reside within groups. These include things such as buttons, toggle buttons, check boxes, text boxes and many other controls. For a complete list of all the available controls, see Architecture of the Server Ribbon at http://msdn.microsoft.com/en-us/library/ee537017.aspx<br /><br /><span style="font-weight: bold;">Contextual Tab Groups on the SharePoint 2010 Server Ribbon:</span><br />Contextual tab groups are used to provide functions that are not global to the current context, such as the page. They appear only when certain circumstances have been met and contain one or more tabs.<br /><br />Contextual tab groups hide functionality and menu choices from the user when they are not available, and appear when applicable. Other examples of contextual tab groups include the Editing Tools contextual tab group that appears when editing a wiki page, or the Picture Tools contextual tab group that appears when a picture is selected in edit mode.Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-13484993016707780122011-12-28T01:16:00.000-08:002011-12-28T01:20:32.043-08:00SELECT Top N from ACESS DatabaseHere is the Query to select the top N records from Access database's table:<br><br />SELECT Top N Table.*FROM Table where Column is not null;Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com1tag:blogger.com,1999:blog-2354035770281740967.post-1824166039986226452011-10-31T23:24:00.000-07:002011-10-31T23:32:07.007-07:00A network-related or instance-specific error occurred while establishing a connection to SQL Server.<strong><u>Problem</u></strong>: A network-related or instance-specific error occurred while establishing a connection to SQL Server.<br /><strong><em>Server OS</em></strong>: windows 2008<br /><strong><em>Client OS</em></strong>: Windows 7<br /><br /><strong><u>Solution</u></strong>: Open outbound port on client machine, and open inbound port on server<br /><strong><em>1.On Server</em></strong> - Open outbound port by adding a new rule for port 1433 in firewall at server machine<br /><strong><em>2.On Client</em></strong> - Open inbound port by adding a new rule for port 1433 in firewall at client machine<br /><br />See the sample <a href="http://technet.microsoft.com/en-us/library/cc771477(WS.10).aspx">"How to add rule for inbound/outbound port"</a>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-91481606139183394062011-10-25T22:47:00.000-07:002011-10-25T22:53:37.800-07:00Alternate of IssApp command in windows 2008This is a shortcut alternate for IssApp command in windows 2008:<br />Go to C:\Windows\system32 and type<strong> inetsrv\appcmd.exe list wp</strong><br />Here is the output you will get for this command:<br /><em><span style="font-size:78%;">WP "7056" (applicationPool:1c931ee15fb748979d16454c705d8d07)</span></em><br /><em><span style="font-size:78%;">WP "11392" (applicationPool:SecurityTokenServiceApplicationPool</span></em><br /><em><span style="font-size:78%;">WP "3956" (applicationPool:SharePoint - 80)</span></em>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-88087519183133359322011-10-04T16:57:00.000-07:002011-10-04T17:06:02.356-07:00How to change owner of Sharepoint site from administrator to NetworkService<p><strong><em>Steps to "How to change owner of Sharepoint site from administrator to NetworkService":</em></strong></p><br /><br /><p><strong>A. Look application pools in IIS </strong><br /></p><br /><ol><br /><li>Look the identity column in application pool List in IIS 6.0 and the select the application pool which is using administrator as Identity. </li><br /><li>Change identity from Administrator to NetworkService(right click on a pool, click Advance setting, click on Identity and type NetworkService) </li></ol><br /><p><strong>B. Open Database server where Sharepoint database is created for central admin</strong> as well as content dbs for webApps(Login to db server with Administrative or DomAdminitrator’s userId) </p><br /><ol><br /><li>Go to security and select user NetworkService. Right click and select properties. </li><br /><li>Allow access for this user as dbo by selecting User Mapping. User mapping will show you all the database for this userid. </li><br /><li>Click on each database name and select db_owner under “database role membership” </li><br /><li>If your content database was offline or under suspect condition, make it online now. </li></ol><br /><p><strong>C. Restart IIS<br /></strong>Open Central admin or any sharepoint site now for testing </p>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-76709020455503816762011-09-29T16:18:00.000-07:002011-09-29T16:34:52.964-07:00search SharePoint list and return matching column using LINQI Have writen this reusable code, which will open a Sharepoint List, and search that list and return the first matching row's specific column:<br />This function need 04 parameters: ListName, Search FieldName, Search Value, and return Column name.<br /><br /><code><br />public string GetAColumnValueFromList(string listName, string Field, string value, string returnField)<br /> {<br /> string outData = string.Empty;<br /> DataTable dtResult = new DataTable();<br /><br /> try<br /> {<br /> if (oList == null)<br /> {<br /> using (SPSite oSiteCollection = new SPSite(siteUrl))<br /> {<br /> using (SPWeb oWebsiteRoot = oSiteCollection.OpenWeb("/"))<br /> {<br /> oList = oWebsiteRoot.Lists[listName];<br /><br /> }<br /> }<br /> }<br /> <br /> List<SPListItem> items = (from li in oList.Items.OfType<SPListItem>()<br /> where li["GUID1"].ToString() == value <br /> select li).ToList<SPListItem>();<br /><br /> foreach (SPListItem item in items)<br /> {<br /> outData = item[returnField].ToString();<br /> }<br /><br /> return outData;<br /> }<br /> catch (Exception ex)<br /> {<br /> EnterpriseLibrary.HandleException(ex, Policies.BLL);<br /> throw ex;<br /> } <br /> }<br /></code><br /><br />If you like this solution, then care for a tree which need some water, <strong><span style="color:#006600;">so give water to a plant and make that green</span></strong>.<br />Start using <a href="http://www.code4green.com/"><strong><span style="color:#009900;">http://www.code4green.com</span></strong></a> as your free code generation tool for Sharepoint, PowerShell, C#, ASP.net, SQL, and many more languages.<br />let other know about this tool, because this tool is helping community.Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-34934804044701778882011-09-29T15:54:00.000-07:002011-09-29T16:16:44.338-07:00LINQ Query on SPListItem returning "Value does not fall within the expected range."If you are doing LINQ Qery on SHarepoint SpListItem object and getting the following error: "Value does not fall within the expected range."<br />Might be this little simple (addition of .ToString()) will help you to make it work.<br /><strong><u>Original Code</u></strong><br />List<splistitem> items = (from li in oList.Items.OfType<splistitem>()<br />where li["UserName"] == value<br />select li).ToList<splistitem>();<br /><br />change this query to like this by adding .ToString() in li["ColName"]=="Value"<br /><strong><u>Changed Code<br /></u></strong>List<splistitem> items = (from li in oList.Items.OfType<splistitem>()<br />where li["Username"]<strong><span style="color:#cc0000;">.ToString()</span></strong> == value<br />select li).ToList<splistitem>();<br /><br />If you like this solution, then care for a tree which needs some water, so water a plant and make that green.<br />Start using <a href="http://www.code4green.com/">http://www.code4green.com</a> as your free code generation tool for Sharepoint, PowerShell, C#, ASP.net, SQL, and many more languages.<br />let other know about this tool, because this tool is helping community to plant tree.Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-14855390960135534092011-09-19T12:18:00.001-07:002011-09-19T12:30:46.143-07:00Windows service is not able to read outlook email<strong><u>Problem</u>: </strong><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmSxtfd8mDBgDMGWJ5NYNuMBINHsKAQVfic62-_fWduk66HmISwc2ShR5vLHzsf84rRBVgDM4amt6kTh8nvCN6f8ti5mCcI1TY3Srwr_rPKrXMWTTBoCXVQ2_6Sq6ISnA64bDjVi0p_C5f/s1600/WindowsServiceNotAbleToReadOutlookEmail.PNG" target="_new"><img style="MARGIN: 0px 0px 10px 10px; WIDTH: 357px; FLOAT: right; HEIGHT: 400px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5654154378598268402" border="0" alt="image created by code4green.com" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmSxtfd8mDBgDMGWJ5NYNuMBINHsKAQVfic62-_fWduk66HmISwc2ShR5vLHzsf84rRBVgDM4amt6kTh8nvCN6f8ti5mCcI1TY3Srwr_rPKrXMWTTBoCXVQ2_6Sq6ISnA64bDjVi0p_C5f/s400/WindowsServiceNotAbleToReadOutlookEmail.PNG" /></a> If you are trying to read the outlook email (using outlook api) from your "windows service", then it will not show any email.<br /><strong><u>Reason</u></strong>: Your service is running under Local System Account, which has no profile in your outlook.<br />Your service will runn success full but it will not show any email because of not-matched user profile.<br /><strong><u>Solution</u></strong>: Change the service account <strong>"Log On"</strong> option, so your windows service will run under a user account which has user profile for outlook.<br /><strong><u>Steps</u></strong>: Here are the steps to fix this issue -<br />1. Right click on My Computer, click on Manage<br />2. Clicke on Service, and select your service like "Code4Green Email Reader"<br />3. Click on service properties<br />4. Click the tab Log On<br />5. select Logon as: This account -<br />6. enter outlook's profile login name with domain name<br />7. enter password<br />8. enter confirm password<br />9. click Apply<br />10. click OK<br /><br /><br /><br /><p></p>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-45850838601914255602011-09-16T12:08:00.000-07:002011-09-16T12:25:41.399-07:00Remove the dll from GAC without using GAC utilUsing the following name space :System.EnterpriseServices.Internal, you can uninstall or remove assembly from GAC without using GacUril in your production environment.<br /><br />I have seen on web, that people are getting hard time to use Publish.GacRemove method, because they don't know how to give the path name.<br />Here are two step to uninstall the dll from GAC without using GacUtil.<br /><br /><strong>STEP 1: <br /></strong><br />Copy the existing dll into a temp folder and then use that path to remove/uninstall. Here is the Powershell code to copy the dll from gac to directory:<br />dir C:\Windows\Assembly -Recurse -Filter "YourDLLName*.dll" foreach { copy $_.FullName C:\Temp\assemblies }<br /><br /><strong>STEP 2:</strong><br />Here is the powershell code to remove the dll from gac using path in step1<br /><br /># load System.EnterpriseServices assembly<br />[Reflection.Assembly]::LoadWithPartialName("System.EnterpriseServices, Version=2.0.0.0")<br /><br /># create an instance of publish class<br />[System.EnterpriseServices.Internal.Publish] $publish = new-object System.EnterpriseServices.Internal.Publish<br /><br />#UnInstall UserTracking.DAL.dll in gac<br />$AssemblyFullName = "C:\Temp\Assembly\YourDLLName*.dll"<br />$publish.GacRemove($AssemblyFullName)<br /><br />dll name in $AssemblyFullName = "C:\Temp\Assembly\YourDLLName*.dll", is copied from GAC to C:\Temp\Assembly folder in step1.<br /><br />I hope this article will help to someone, please plant a tree in your life span if you get any help from this as a donation to <a href="http://www.code4green.com/">www.code4green.com</a>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com4tag:blogger.com,1999:blog-2354035770281740967.post-86708730735297987942011-06-13T12:10:00.000-07:002011-06-13T12:20:42.277-07:00Best way to handle null in C# - Use Null Coalescing OperatorThe Best way to handle null in C# - Use <strong>Null Coalescing Operator</strong>. You have seen some samples where I have used <strong>?? operator</strong>, that is nothing but a "<strong>Null Coalescing Operator</strong>"<br /><br /><strong>Null Coalescing Operator</strong> or <strong>?? Operator</strong> in C# is supported in Visual Studio 2005, 2008, and 2010.<br /><br />The <strong>Null Coalescing Operator</strong> or <strong>?? operator</strong> returns the left-hand operand if it is not null, or else it returns the right operand.<br /><br />string strData;<br />strData = rsDB("FieldName").ToString() ?? "No Data";<br /><br />strData will get value "No Data" in case of rsDB("FieldName") is null.<br /><br /><span style="color:#003300;">Enjoy Green coding</span> @ <a href="http://www.code4green.com/"><strong><span style="color:#003333;">www.Code4Green.com</span></strong></a>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-52524590217337862582011-05-24T13:07:00.000-07:002011-05-24T13:13:56.264-07:00The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.If you are getting the following error while Attaching a EventHandler on a Sharepoint List, than follow these three steps to resolve that issue..<br /><strong><u></u></strong><br /><strong><u>Error</u></strong>: The security validation for this page is invalid. Click Back in your Web browser, refresh the page, and try your operation again.<br /><strong><u>Solution</u></strong>: Add the following Lines in you List Update code:<br />1. SPSecurity.<strong>RunWithElevatedPrivileges</strong>(delegate(){ - See Line 01<br />2. Add site.RootWeb.<strong>AllowUnsafeUpdates</strong> = true; , See Line 04<br />3. Add site.WebApplication.<strong>FormDigestSettings.Enabled</strong> = false;, See line 10<br /><strong><u>Sample Code </u></strong><br /><strong><span style="color:#ff0000;"></span></strong><br /><span style="color:#ff0000;">SPSecurity.RunWithElevatedPrivileges(delegate(){<br /></span>using (SPSite site = new SPSite(URL))<br />{<br /><span style="color:#ff0000;">site.RootWeb.AllowUnsafeUpdates = true;<br /></span>using (SPWeb siteWeb = site.OpenWeb())<br />{<br />SPList list = siteWeb.Lists["TestList"];<br /><br />SPEventReceiverDefinition defItemAdding = list.EventReceivers.Add();<br /><span style="color:#ff0000;">site.WebApplication.FormDigestSettings.Enabled = false;<br /></span>defItemAdding.Assembly = "WSPBuilderProject1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=e0a58138cf93116a";<br />defItemAdding.Class = "WSPBuilderProject1.TestListEH";<br />defItemAdding.Name = "AddingEventHandler";<br />defItemAdding.Type = SPEventReceiverType.ItemAdding;<br />defItemAdding.SequenceNumber = 1001;<br />//defItemAdding.Synchronization = SPEventReceiverSynchronization.Synchronous;<br /><br />defItemAdding.Update();<br />site.WebApplication.FormDigestSettings.Enabled = true;<br /><br />}<br />site.RootWeb.AllowUnsafeUpdates = false;<br />}<br />});<br /><br />Enjoy Sharepoint Green Coding @ <strong><span style="color:#003300;"><a href="http://www.code4green.com/">Code4Green.com</a></span></strong>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0tag:blogger.com,1999:blog-2354035770281740967.post-45256323640850470712011-05-03T12:25:00.000-07:002011-05-03T12:32:11.669-07:00How To Add Windows Live Messanger in your website?<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9WhbFme-F13IdIrMyFCVRsJo0PnF-NbhEnczfseqEc-RXKNiUPFFNDsRe4F0eNA0p1xvSDISQr8wgt9EzSI4Ehps0HaPD_QBWQNJ8zPkfAambKaJpOrPN7Q_Ic0M2BSiNiSqAwyNspu4C/s1600/How+To+Add+Instant+Messaging+to+your+website.png"><img style="TEXT-ALIGN: center; MARGIN: 0px auto 10px; WIDTH: 180px; DISPLAY: block; HEIGHT: 320px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5602574912800191650" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9WhbFme-F13IdIrMyFCVRsJo0PnF-NbhEnczfseqEc-RXKNiUPFFNDsRe4F0eNA0p1xvSDISQr8wgt9EzSI4Ehps0HaPD_QBWQNJ8zPkfAambKaJpOrPN7Q_Ic0M2BSiNiSqAwyNspu4C/s320/How+To+Add+Instant+Messaging+to+your+website.png" /></a><br /><br /><div><strong>If you know HTML, than you can do this easily, just follow these 12 steps and see these steps in attached screen shot. I am sure on the 12th step, you will see the miracle... :)<br /><br /></strong>1. Login to http://login.live.com with you live/hotmail/msn email id<br />2. go to setting page <a href="http://settings.messenger.live.com/applications/Default.aspx" target="_new">Windows Live Setting</a><br />3. click on WebSetting link in left side menu<br />4. Select checkbox for " Allow anyone on the web to see my presence and send me messages."<br />5. Click Save button on top of the page<br />6. Click on Create HTML link in left side menu<br />7. Choose which control you want to display on your page. It has three options<br />7.1 - IM window - It embed the messanger as a frame. It will allow chating within your site's page. This will give you the option to<br /><br />select height, width and theme color for your messanger.<br />7.2 - Button - Show button with current status of messanger. This will launch the web based windows IM in new window.<br />7.3 - Status Icon -> This will show only status icon of your messanger's status. This will launch the web based windows IM in new<br /><br />window.<br />NOTE: Step 7.1, and 7.2 will open a new page with the following url with your Live Invite Id as invitee:<br />http://settings.messenger.live.com/Conversation/IMMe.aspx?invitee=bd72eb1303b8b293@apps.messenger.live.com&mkt=en-CA<br />8. After selecting the option in step 7, it will generate the html and display in textbox next to label "Copy the HTML and paste it into<br /><br />your webpage"<br />8.1. copy and paste html in your html or asp.net page and run it.<br />9. Once you will run your page, than it will ask a visitor to begin conversation. Click on Begin Conversation link.<br />10. Onclick over Begin Conversation, it will popup a window to type visitor's name. So type your name here and hit OK button.<br />11. After entering your name as visitor, system will popup Captcha screen, enter the characters shown on the image 2gNC3V0g and click on<br /><br />submit button.<br />12. Now you are ready to chat, start doing chating.<br /><br />Enjoy your green code @code4green.com</div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com2tag:blogger.com,1999:blog-2354035770281740967.post-49625026932042836992011-04-28T14:04:00.000-07:002011-04-28T14:39:23.525-07:00Create a new SharePoint column in User Profile's list<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYkLbk-8esPiirWUoDQWcDmMB3KW40YtjWYbOPaPisf4fY9Mr55ghNA5cXzC0hMQZlWoDaq5MhUxs-BJRu9QvnjyALNX5XP_L_bZlaoYJLXcs7YJ5juqFo5efHdiRMScSvh8WFn-vMrKvB/s1600/Moss+User+Profile+List.png"><img style="MARGIN: 0px 10px 10px 0px; WIDTH: 400px; FLOAT: left; HEIGHT: 228px; CURSOR: hand" id="BLOGGER_PHOTO_ID_5600749106951872994" border="0" alt="" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYkLbk-8esPiirWUoDQWcDmMB3KW40YtjWYbOPaPisf4fY9Mr55ghNA5cXzC0hMQZlWoDaq5MhUxs-BJRu9QvnjyALNX5XP_L_bZlaoYJLXcs7YJ5juqFo5efHdiRMScSvh8WFn-vMrKvB/s400/Moss+User+Profile+List.png" /></a><br /><br /><br /><br /><br /><br /><br /><br /><div><strong><span style="font-size:130%;"><span style="color:#000000;"></span></span></strong></div><br /><br /><br /><br /><br /><div><strong><span style="font-size:130%;"><span style="color:#000000;">How to get a hidden Sharepoint List for User Profile?</span><br /></span></strong>Here is the way to find out hidden user profile's list in sharepoint: At the top level site in site collection, type this url: <span style="color:#000099;">/_catalogs/users/simple.aspx</span> , that will give you User Information List's default view. </div><br /><br /><div><strong>Go and edit this page</strong>(site action >> edit page), and than modifiy Shared webpart. It will give list view of this list, edit the current view. Edit will show the editable view of that user Profile's hidden list. </div><br /><br /><div><strong>Now you got the place where you can see all the column from this hidden treasure</strong>, now it is the time to add a new column in this list, so you can use this column in your custom permission's code:</div><br /><br /><div><strong><span style="color:#000000;">Here is the PowerShell to Create a New Coloumn in hidden site collection level's "User Information List"</span> </strong></div><br /><br /><div><span style="color:#000099;"></span></div><br /><br /><div><span style="color:#000099;">[system.reflection.assembly]::loadwithpartialname("<span style="color:#660000;">microsoft.sharepoint</span>")<br /></span><span style="color:#ff6600;">$site</span>= New-Object <span style="color:#330033;">Microsoft.SharePoint.SPSite</span> ("<span style="color:#660000;">http://YourSiteName</span>")<br /><span style="color:#ff6600;">$web</span>=<span style="color:#ff6600;">$site</span>.OpenWeb()<br /><span style="color:#ff6600;">$list</span>=<span style="color:#ff6600;">$web</span>.Lists["<span style="color:#660000;">User Information </span><span style="color:#660000;">List</span>"]<br /><span style="color:#ff6600;">$list</span>.Fields.Add("<span style="color:#990000;">Region1", "Text", </span><span style="color:#330033;">0</span>) </div>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com2tag:blogger.com,1999:blog-2354035770281740967.post-72878184294772108812011-04-19T14:50:00.000-07:002011-04-19T15:12:34.570-07:00WebMatrix - New Buzzword in IT Industry<strong>WebMatrix</strong> is a free tool that allows you to create, customize and publish websites, Believe me It’s amazingly easy to use.<br />WebMatrix <strong>connects</strong> you to a world of popular and free open-source Web applications, including <strong>WordPress, DotNetNuke, Umbraco, Joomla!, Moodle, Drupal</strong> , and many more(<strong>till now 49 apps</strong>). You can select a website from built-in gallery, and WebMatrix will handle all the downloading and installation of your new Web site.<br /><br />Here is the list of Features of WebMatrix which makes it very powerful and #1 development tool for the web development.<br /><b>Features List of WebMatrix</b><br /><br /><br /><ul><br /><br /><li>Small, but complete package - It is free web development tool. It is small in size but very powerful tool.</li><br /><br /><li>Desktop based Web Development and Testing Environment - You will get the same powerful Web server(IIS Express), database engine(SQL CE4), and frameworks(MVC 3.0) that your Web site on the internet uses. This ensures that your transition from development to production is smooth and seamless.</li><br /><br /><li>Easy to Code - Start with HTML, CSS and JavaScript and then seamlessly connect to a database or add in dynamic server code using the new ‘Razor’ syntax for ASP.NET Web pages.</li><br /><br /><li>Webmatrix have intellisense - it also supports tag completion and hinting for standard HTML and CSS markup making it easier and faster for you to write code.</li><br /><br /><li>Simple Publishing - You can find host company to suite your need. Use webMatrix to find your web host which supports webmatrix.</li><br /><br /><li>Easy to cross bowser testing - You can test your site directly will diffrent browsers using webmartix tool.</li><br /><br /><li>Last but not least - It will connect you with lots of open source web applications(till the date i am writing this blog - 49 applications incliding most populars WordPress, DotNetNuke, Umbraco, Joomla!, Moodle, Drupal and more)</li><br /><br /><li>Make your site More Search engine friendly - Run an SEO report and find how to make your site more visible to search engines.</li><br /><br /><li>Code Helper is the best helping tool - Want to display a Twitter feed? Need to show a video? Code helpers make common tasks easy to do with just a simple tag in your HTML(Yes it is HTML not server side...).</li><br /><br /><li>Nice Interface with IDE, Database, IIS, FTP, and more - WebMatrix has rich code editor, a database editor, Web server management, Search Engine Optimization, FTP publishing, and many more..</li><br /><br /><li>Easy and Lightweight Database - Using a database has never been easier! WebMatrix includes a small, embedded database SQL Server CE 4. Copy that database from your machine to web server under bin folder and you are done.</li><br /><span style="color:#003300;"><strong>Enjoy your Green coding</strong></span> <strong><span style="color:#ff0000;">@</span></strong> <strong><span style="color:#003300;">code4Green.com</span></strong></ul>Hussain M. Naqvihttp://www.blogger.com/profile/14325331990382816485noreply@blogger.com0