<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8150937948162271377</id><updated>2012-01-15T09:04:51.189+05:30</updated><category term='Reorder List'/><category term='calendar'/><category term='Microsoft Technical Issues and Solutions'/><category term='DotNetNuke Tips'/><category term='Dot Net Solutions'/><category term='DotNetNuke'/><category term='Single Sign On'/><category term='ecommerce'/><category term='Silverlight'/><category term='Ajax Issues'/><title type='text'>ASP.NET C# AJAX DOTNETNUKE SOLUTIONS GOOGLE APPS - MICROSOFT TECHNICAL ISSUES</title><subtitle type='html'>This blog is for MICROSOFT TECHNICAL ISSUES and Solutions for
ASP.NET C# AJAX DOTNETNUKE and GOOGLE APPS</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>21</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-3099077574979362707</id><published>2010-05-09T11:19:00.002+05:30</published><updated>2010-05-09T11:26:03.443+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net Solutions'/><title type='text'>Retrieve passwords from a Dotnetnuke system</title><content type='html'>I have posted another post for resetting the lost passwords through the database. Today I am going to show how to get the password through a C# code.&lt;br /&gt;DotNetNuke is using a highly secured encrypted method to save passwords to the system. I am not going to explain it here. In some other cases you may need to retrieve the saved passwords. It won’t possible to read it via SQL tables because of it is encrypted.&lt;br /&gt;But if you want to compare the passwords with your logged in user or with your passing password string you can use this method.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;public string ReturnPw()&lt;br /&gt;        {&lt;br /&gt;                UserController uc = new UserController();&lt;br /&gt;                UserInfo ui = new UserInfo();&lt;br /&gt;                if (UserId &gt; 0)&lt;br /&gt;                {&lt;br /&gt;                     ui = uc.GetUser(this.PortalId, this.UserId);&lt;br /&gt;                     string un = ui.Username.ToString();&lt;br /&gt;&lt;br /&gt;                    UserInfo oUser = UserController.GetUserByName(this.PortalId, un);&lt;br /&gt;                    if (oUser != null)&lt;br /&gt;                    {&lt;br /&gt;                        //Get the password&lt;br /&gt;                        string pwrd = UserController.GetPassword(ref oUser, "");&lt;br /&gt;                        return pwrd;&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                return "N/A";&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;This method is giving the password of logged in user. But you can customize it as your requirement.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-3099077574979362707?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/3099077574979362707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/05/retrieve-password-from-dotnetnuke.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3099077574979362707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3099077574979362707'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/05/retrieve-password-from-dotnetnuke.html' title='Retrieve passwords from a Dotnetnuke system'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-5507614794992372309</id><published>2010-01-20T14:12:00.019+05:30</published><updated>2010-01-20T15:27:35.468+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce'/><title type='text'>dotnetnuke store product search module - part 1</title><content type='html'>DotNetNuke® is the ideal platform for building professional websites and web applications with dynamic content and interactive features. DotNetNuke store module is an ecommerce module which is running on DNN platform.  This module contains lots of features. But I saw there was not  a product search module. The module team leader Gilles Le Pigocher and Benoit Sarton helped me to develop this feature. Gilles Le Pigocher has added this to his long to do list. So this will be available in the future with a future store version. But until then this will be useful to all of you. Still you can use the store module with the search module what I have given. As you know this module contains 21 projects. Then I have added only source file codes with my modified codes. If you have any questions I am ready to help you. Once again my special thanks to my two French friends Gilles Le Pigocherand Benoît Sarton for their effort and all the advices.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Catalog.ascx.cs&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;using System;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Collections.Specialized;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Net;&lt;br /&gt;using System.Text.RegularExpressions;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using DotNetNuke.Common.Utilities;&lt;br /&gt;using DotNetNuke.Entities.Modules;&lt;br /&gt;using DotNetNuke.Entities.Modules.Actions;&lt;br /&gt;using DotNetNuke.Services.Exceptions;&lt;br /&gt;using DotNetNuke.Services.Localization;&lt;br /&gt;using DotNetNuke.Security;&lt;br /&gt;using DotNetNuke.Modules.Store.Admin;&lt;br /&gt;using DotNetNuke.Modules.Store.Catalog;&lt;br /&gt;using DotNetNuke.Modules.Store.Components;&lt;br /&gt;using System.Web;&lt;br /&gt;&lt;br /&gt;namespace DotNetNuke.Modules.Store.WebControls&lt;br /&gt;{&lt;br /&gt; public enum ProductListTypes&lt;br /&gt; {&lt;br /&gt;        New,&lt;br /&gt;  Featured,&lt;br /&gt;  Popular,&lt;br /&gt;  Category,&lt;br /&gt;&lt;br /&gt;        MySearchResult&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; /// &lt;summary&gt;&lt;br /&gt; /// Summary description for Media.&lt;br /&gt; /// &lt;/summary&gt;&lt;br /&gt; public partial class Catalog : PortalModuleBase, IActionable&lt;br /&gt; {&lt;br /&gt;  #region Private Members&lt;br /&gt;&lt;br /&gt;        private ModuleSettings moduleSettings;&lt;br /&gt;        private StoreInfo storeInfo;&lt;br /&gt;        private string templatesPath = "";&lt;br /&gt;  private CatalogNavigation catalogNav;&lt;br /&gt;  private CategoryInfo categoryInfo = new CategoryInfo();&lt;br /&gt;  private ProductInfo productInfo = new ProductInfo();&lt;br /&gt;        private string npTitle = null;&lt;br /&gt;        private string fpTitle = null;&lt;br /&gt;&lt;br /&gt;        private string MSTitle = null;&lt;br /&gt;&lt;br /&gt;        private string ppTitle = null;&lt;br /&gt;        private string cpTitle = null;&lt;br /&gt;        private enum MetaTags&lt;br /&gt;        {&lt;br /&gt;            Title = 1,&lt;br /&gt;            Keywords,&lt;br /&gt;            Description,&lt;br /&gt;        }&lt;br /&gt;        private Regex regTokens = new Regex("\\[\\w+\\]", RegexOptions.IgnoreCase | RegexOptions.Compiled);&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;  #region Public Properties&lt;br /&gt;&lt;br /&gt;  public ModuleSettings ModuleSettings&lt;br /&gt;  {&lt;br /&gt;   get{return moduleSettings;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public Int32 CategoryID&lt;br /&gt;  {&lt;br /&gt;   get {return catalogNav.CategoryID;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public Int32 ProductID&lt;br /&gt;  {&lt;br /&gt;   get {return catalogNav.ProductID;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public DotNetNuke.Framework.CDefault BasePage&lt;br /&gt;        {&lt;br /&gt;            get { return (DotNetNuke.Framework.CDefault)this.Page; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;  #region Web Form Designer generated code&lt;br /&gt;&lt;br /&gt;  override protected void OnInit(EventArgs e)&lt;br /&gt;  {&lt;br /&gt;   //&lt;br /&gt;   // CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;br /&gt;   //&lt;br /&gt;   InitializeComponent();&lt;br /&gt;   base.OnInit(e);&lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;  &lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;  ///  Required method for Designer support - do not modify&lt;br /&gt;  ///  the contents of this method with the code editor.&lt;br /&gt;  /// &lt;/summary&gt;&lt;br /&gt;  private void InitializeComponent()&lt;br /&gt;  {&lt;br /&gt;            if (storeInfo == null)&lt;br /&gt;            {&lt;br /&gt;                StoreController storeController = new StoreController();&lt;br /&gt;                storeInfo = storeController.GetStoreInfo(PortalId);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Events&lt;br /&gt;&lt;br /&gt;  protected void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;  {&lt;br /&gt;            if (storeInfo != null)&lt;br /&gt;            {&lt;br /&gt;                npTitle = Localization.GetString("NPTitle.Text", this.LocalResourceFile);&lt;br /&gt;                fpTitle = Localization.GetString("FPTitle.Text", this.LocalResourceFile);&lt;br /&gt;&lt;br /&gt;                MSTitle = Localization.GetString("MSTitle.Text", this.LocalResourceFile);&lt;br /&gt;&lt;br /&gt;                ppTitle = Localization.GetString("PPTitle.Text", this.LocalResourceFile);&lt;br /&gt;                cpTitle = Localization.GetString("CPTitle.Text", this.LocalResourceFile);&lt;br /&gt;&lt;br /&gt;                try&lt;br /&gt;                {&lt;br /&gt;                    if (storeInfo.PortalTemplates)&lt;br /&gt;                    {&lt;br /&gt;                        templatesPath = PortalSettings.HomeDirectoryMapPath + "Store\\";&lt;br /&gt;                        CssTools.AddCss(this.Page, PortalSettings.HomeDirectory + "Store", PortalId);&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        templatesPath = MapPath(ModulePath) + "\\";&lt;br /&gt;                        CssTools.AddCss(this.Page, this.TemplateSourceDirectory, PortalId);&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    moduleSettings = new ModuleSettings(this.ModuleId, this.TabId);&lt;br /&gt;&lt;br /&gt;                    catalogNav = new CatalogNavigation(Request.QueryString);&lt;br /&gt;&lt;br /&gt;                    if (catalogNav.CategoryID == Null.NullInteger)&lt;br /&gt;                    {&lt;br /&gt;                        if (bool.Parse(moduleSettings.General.UseDefaultCategory))&lt;br /&gt;                        {&lt;br /&gt;                            catalogNav.CategoryID = int.Parse(moduleSettings.General.DefaultCategoryID);&lt;br /&gt;                            Response.Redirect(catalogNav.GetNavigationUrl(), true);&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    if (catalogNav.ProductID != Null.NullInteger)&lt;br /&gt;                    {&lt;br /&gt;                        ProductController productController = new ProductController();&lt;br /&gt;                        productInfo = productController.GetProduct(PortalId, catalogNav.ProductID);&lt;br /&gt;                        catalogNav.CategoryID = productInfo.CategoryID;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                    {&lt;br /&gt;                        CategoryController categoryController = new CategoryController();&lt;br /&gt;                        categoryInfo = categoryController.GetCategory(catalogNav.CategoryID);&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    if (storeInfo.SEOFeature)&lt;br /&gt;                    {&lt;br /&gt;                        BasePage.Title = SEO(Localization.GetString("ListSEOTitle", this.LocalResourceFile), MetaTags.Title);&lt;br /&gt;                        BasePage.Description = SEO(Localization.GetString("ListSEODescription", this.LocalResourceFile), MetaTags.Description);&lt;br /&gt;                        BasePage.KeyWords = SEO(Localization.GetString("ListSEOKeywords", this.LocalResourceFile), MetaTags.Keywords);&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    this.Controls.Add(TemplateController.ParseTemplate(templatesPath, moduleSettings.General.Template, new ProcessTokenDelegate(processToken)));&lt;br /&gt;                }&lt;br /&gt;                catch (Exception ex)&lt;br /&gt;                {&lt;br /&gt;                    Exceptions.ProcessModuleLoadException(this, ex);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                string ErrorSettings = Localization.GetString("ErrorSettings", this.LocalResourceFile);&lt;br /&gt;                string ErrorSettingsHeading = Localization.GetString("ErrorSettingsHeading", this.LocalResourceFile);&lt;br /&gt;                DotNetNuke.UI.Skins.Skin.AddModuleMessage(this, ErrorSettingsHeading, ErrorSettings, DotNetNuke.UI.Skins.Controls.ModuleMessage.ModuleMessageType.YellowWarning);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Private Functions&lt;br /&gt;&lt;br /&gt;  private Control processToken(string tokenName)&lt;br /&gt;  {&lt;br /&gt;   ProductController productController = new ProductController();&lt;br /&gt;   ArrayList productList = new ArrayList();&lt;br /&gt;&lt;br /&gt;   switch (tokenName.ToUpper())&lt;br /&gt;   {&lt;br /&gt;    case "MESSAGE":&lt;br /&gt;                    if (bool.Parse(moduleSettings.General.ShowMessage) &amp;amp;&amp;amp; categoryInfo != null)&lt;br /&gt;                    {&lt;br /&gt;                        Panel pnlMessage = new Panel();&lt;br /&gt;                        pnlMessage.CssClass = "StoreMessage";&lt;br /&gt;                        if (categoryInfo != null)&lt;br /&gt;                        {&lt;br /&gt;                            string message = Server.HtmlDecode(categoryInfo.Message);&lt;br /&gt;                            if (message != Null.NullString)&lt;br /&gt;                            {&lt;br /&gt;                                Panel pnlCategoryMessage = new Panel();&lt;br /&gt;                                pnlCategoryMessage.CssClass = "StoreCategoryMessage";&lt;br /&gt;                                Literal litCategoryMessage = new Literal();&lt;br /&gt;                                litCategoryMessage.Text = System.Web.HttpUtility.HtmlDecode(message);&lt;br /&gt;                                pnlCategoryMessage.Controls.Add(litCategoryMessage);&lt;br /&gt;                                pnlMessage.Controls.Add(pnlCategoryMessage);&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                        {&lt;br /&gt;                            //sub categories...&lt;br /&gt;                            CategoryController controller = new CategoryController();&lt;br /&gt;                            ArrayList subCategories = controller.GetCategories(PortalId, false, catalogNav.CategoryID);&lt;br /&gt;                            if (subCategories.Count &amp;gt; 0)&lt;br /&gt;                            {&lt;br /&gt;                                HtmlGenericControl pSubCategories = new HtmlGenericControl("p");&lt;br /&gt;                                pSubCategories.Attributes.Add("class", "StoreSubCategories");&lt;br /&gt;&lt;br /&gt;                                LiteralControl BreakRow = new LiteralControl(Localization.GetString("BeforeSubCategories", this.LocalResourceFile));&lt;br /&gt;                                pSubCategories.Controls.Add(BreakRow);&lt;br /&gt;&lt;br /&gt;                                Boolean bIsFirst = true;&lt;br /&gt;                                foreach (CategoryInfo category in subCategories)&lt;br /&gt;                                {&lt;br /&gt;                                    if (bIsFirst)&lt;br /&gt;                                    {&lt;br /&gt;                                        bIsFirst = false;&lt;br /&gt;                                    }&lt;br /&gt;                                    else&lt;br /&gt;                                    {&lt;br /&gt;                                        LiteralControl BreakRow2 = new LiteralControl(Localization.GetString("BetweenSubCategories", this.LocalResourceFile));&lt;br /&gt;                                        pSubCategories.Controls.Add(BreakRow2);&lt;br /&gt;                                    }&lt;br /&gt;                                    HyperLink link = new HyperLink();&lt;br /&gt;                                    link.Text = category.CategoryName;&lt;br /&gt;                                    link.CssClass = "StoreSubCategoryItem";&lt;br /&gt;                                    StringDictionary replaceParams = new StringDictionary();&lt;br /&gt;                                    replaceParams["CategoryID"] = category.CategoryID.ToString();&lt;br /&gt;                                    replaceParams["ProductID"] = Null.NullString;&lt;br /&gt;                                    replaceParams["PageIndex"] = Null.NullString;&lt;br /&gt;                                    link.NavigateUrl = catalogNav.GetNavigationUrl(replaceParams, storeInfo.StorePageID);&lt;br /&gt;                                    pSubCategories.Controls.Add(link);&lt;br /&gt;                                }&lt;br /&gt;                                BreakRow = new LiteralControl(Localization.GetString("AfterSubCategories", this.LocalResourceFile));&lt;br /&gt;                                pSubCategories.Controls.Add(BreakRow);&lt;br /&gt;                                pnlMessage.Controls.Add(pSubCategories);&lt;br /&gt;                            }&lt;br /&gt;                        }&lt;br /&gt;                        return pnlMessage;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;                case "NEW":&lt;br /&gt;                    if (bool.Parse(moduleSettings.General.ShowNewProducts))&lt;br /&gt;                    {&lt;br /&gt;                        if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                        {&lt;br /&gt;                            GetNewProducts(catalogNav.CategoryID, productList);&lt;br /&gt;                            productList = TruncateList(productList, int.Parse(moduleSettings.NewProducts.RowCount) * int.Parse(moduleSettings.NewProducts.ColumnCount));&lt;br /&gt;                            return LoadProductList(productList, ProductListTypes.New);&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            GetPortalNewProducts(PortalId, productList);&lt;br /&gt;                            productList = TruncateList(productList, int.Parse(moduleSettings.NewProducts.RowCount) * int.Parse(moduleSettings.NewProducts.ColumnCount));&lt;br /&gt;                            return LoadProductList(productList, ProductListTypes.New);&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        return null;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;    case "FEATURED":&lt;br /&gt;     if (bool.Parse(moduleSettings.General.ShowFeaturedProducts))&lt;br /&gt;     {&lt;br /&gt;      if(catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;      {&lt;br /&gt;                            GetFeaturedProducts(catalogNav.CategoryID, productList);&lt;br /&gt;       productList = TruncateList(productList, int.Parse(moduleSettings.FeaturedProducts.RowCount) * int.Parse(moduleSettings.FeaturedProducts.ColumnCount));&lt;br /&gt;       return LoadProductList(productList, ProductListTypes.Featured);&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;                            GetPortalFeaturedProducts(PortalId, productList);&lt;br /&gt;       productList = TruncateList(productList, int.Parse(moduleSettings.FeaturedProducts.RowCount) * int.Parse(moduleSettings.FeaturedProducts.ColumnCount));&lt;br /&gt;       return LoadProductList(productList, ProductListTypes.Featured);&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;     {&lt;br /&gt;      return null;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                case "MYSEARCHRESULT":&lt;br /&gt;&lt;br /&gt;                    if (bool.Parse(moduleSettings.General.ShowMYSEARCHProducts))&lt;br /&gt;                    {&lt;br /&gt;&lt;br /&gt;                        if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                        {&lt;br /&gt;                            GetMYSEARCHProducts(catalogNav.CategoryID, productList, catalogNav.SearchText, catalogNav.SearchField);&lt;br /&gt;                            productList = TruncateList(productList, int.Parse(moduleSettings.MYSEARCHProducts.RowCount) * int.Parse(moduleSettings.MYSEARCHProducts.ColumnCount));&lt;br /&gt;                            return LoadProductList(productList, ProductListTypes.MySearchResult);&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            GetPortalMYSEARCHProducts(PortalId, productList, catalogNav.SearchText, catalogNav.SearchField);&lt;br /&gt;                            productList = TruncateList(productList, int.Parse(moduleSettings.MYSEARCHProducts.RowCount) * int.Parse(moduleSettings.MYSEARCHProducts.ColumnCount));&lt;br /&gt;                            return LoadProductList(productList, ProductListTypes.MySearchResult);&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        return null;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    case "POPULAR":&lt;br /&gt;     if (bool.Parse(moduleSettings.General.ShowPopularProducts))&lt;br /&gt;     {&lt;br /&gt;      if(catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;      {&lt;br /&gt;                            GetPopularProducts(catalogNav.CategoryID, productList);&lt;br /&gt;       productList = TruncateList(productList, int.Parse(moduleSettings.PopularProducts.RowCount) * int.Parse(moduleSettings.PopularProducts.ColumnCount));&lt;br /&gt;       return LoadProductList(productList, ProductListTypes.Popular);&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;                            GetPortalPopularProducts(PortalId, productList);&lt;br /&gt;                            productList = TruncateList(productList, int.Parse(moduleSettings.PopularProducts.RowCount) * int.Parse(moduleSettings.PopularProducts.ColumnCount));&lt;br /&gt;       return LoadProductList(productList, ProductListTypes.Popular);&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;     {&lt;br /&gt;      return null;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;    case "CATEGORY":&lt;br /&gt;     if (bool.Parse(moduleSettings.General.ShowCategoryProducts))&lt;br /&gt;     {&lt;br /&gt;      if(catalogNav.CategoryID != Null.NullInteger &amp;amp;&amp;amp; catalogNav.ProductID == Null.NullInteger)&lt;br /&gt;      {&lt;br /&gt;                            GetCategoryProducts(catalogNav.CategoryID, productList);&lt;br /&gt;       return LoadProductList(productList, ProductListTypes.Category);&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;       return null;&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;     {&lt;br /&gt;      return null;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;    case "DETAIL":&lt;br /&gt;     if(bool.Parse(moduleSettings.General.ShowProductDetail) &amp;amp;&amp;amp; catalogNav.ProductID != Null.NullInteger)&lt;br /&gt;     {&lt;br /&gt;      return LoadProductDetail();&lt;br /&gt;     }&lt;br /&gt;     else&lt;br /&gt;     {&lt;br /&gt;      return null;&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;    default:&lt;br /&gt;     LiteralControl litText = new LiteralControl(tokenName);&lt;br /&gt;     return litText;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        private void GetNewProducts(int categoryID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            CategoryController categoryController = new CategoryController();&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            CategoryInfo category = categoryController.GetCategory(categoryID);&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetNewProducts(categoryID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))&lt;br /&gt;            {&lt;br /&gt;                if (childCategory.CategoryID != Null.NullInteger)&lt;br /&gt;                {&lt;br /&gt;                    GetNewProducts(childCategory.CategoryID, products);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetPortalNewProducts(int portalID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetPortalNewProducts(portalID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetFeaturedProducts(int categoryID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            CategoryController categoryController = new CategoryController();&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            CategoryInfo category = categoryController.GetCategory(categoryID);&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetFeaturedProducts(categoryID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))&lt;br /&gt;            {&lt;br /&gt;                if (childCategory.CategoryID != Null.NullInteger)&lt;br /&gt;                {&lt;br /&gt;                    GetFeaturedProducts(childCategory.CategoryID, products);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetPortalFeaturedProducts(int portalID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetPortalFeaturedProducts(portalID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private void GetMYSEARCHProducts(int categoryID, ArrayList products, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            CategoryController categoryController = new CategoryController();&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            CategoryInfo category = categoryController.GetCategory(categoryID);&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetMYSEARCHProducts(categoryID, false,SearchText,SearchField))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))&lt;br /&gt;            {&lt;br /&gt;                if (childCategory.CategoryID != Null.NullInteger)&lt;br /&gt;                {&lt;br /&gt;                    GetMYSEARCHProducts(childCategory.CategoryID, products,SearchText,SearchField);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetPortalMYSEARCHProducts(int portalID, ArrayList products, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetPortalMYSEARCHProducts(portalID, false,SearchText,SearchField))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;        private void GetPopularProducts(int categoryID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            CategoryController categoryController = new CategoryController();&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            CategoryInfo category = categoryController.GetCategory(categoryID);&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetPopularProducts(PortalId, categoryID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))&lt;br /&gt;            {&lt;br /&gt;                if (childCategory.CategoryID != Null.NullInteger)&lt;br /&gt;                {&lt;br /&gt;                    GetPopularProducts(childCategory.CategoryID, products);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetPortalPopularProducts(int portalID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetPortalPopularProducts(portalID, false))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void GetCategoryProducts(int categoryID, ArrayList products)&lt;br /&gt;        {&lt;br /&gt;            CategoryController categoryController = new CategoryController();&lt;br /&gt;            ProductController productController = new ProductController();&lt;br /&gt;&lt;br /&gt;            CategoryInfo category = categoryController.GetCategory(categoryID);&lt;br /&gt;&lt;br /&gt;            int sortID;&lt;br /&gt;            if (catalogNav.SortID != Null.NullInteger)&lt;br /&gt;            {&lt;br /&gt;                // Currently selected sort column&lt;br /&gt;                sortID = catalogNav.SortID;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                // Default sort column&lt;br /&gt;                sortID = int.Parse(moduleSettings.CategoryProducts.SortBy);&lt;br /&gt;            }&lt;br /&gt;            string sortDir;&lt;br /&gt;            if (catalogNav.SortDir != Null.NullString)&lt;br /&gt;            {&lt;br /&gt;                // Currently selected sort direction&lt;br /&gt;                sortDir = catalogNav.SortDir;&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                // Default sort direction&lt;br /&gt;                sortDir = moduleSettings.CategoryProducts.SortDir;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (ProductInfo product in productController.GetCategoryProducts(categoryID, false, sortID, sortDir))&lt;br /&gt;            {&lt;br /&gt;                if (storeInfo.ProductsBehavior == (int)Behavior.HideProduct &amp;amp;&amp;amp; product.StockQuantity &amp;lt; 1)&lt;br /&gt;                {&lt;br /&gt;                    // Do nothing, in this case the product is hidden&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                    products.Add(product);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (bool.Parse(moduleSettings.CategoryProducts.SubCategories))&lt;br /&gt;            {&lt;br /&gt;                foreach (CategoryInfo childCategory in categoryController.GetCategories(PortalId, false, categoryID))&lt;br /&gt;                {&lt;br /&gt;                    if (childCategory.CategoryID != Null.NullInteger)&lt;br /&gt;                    {&lt;br /&gt;                        GetCategoryProducts(childCategory.CategoryID, products);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  private Control LoadProductList(ArrayList products, ProductListTypes listType)&lt;br /&gt;  {&lt;br /&gt;   if (products != null &amp;amp;&amp;amp; products.Count &amp;gt; 0)&lt;br /&gt;   {&lt;br /&gt;    ProductList productList = (ProductList)LoadControl(ModulePath + "ProductList.ascx");&lt;br /&gt;    productList.ParentControl = this as PortalModuleBase;&lt;br /&gt;    productList.CategoryID = catalogNav.CategoryID;&lt;br /&gt;                productList.ModuleConfiguration = this.ModuleConfiguration;&lt;br /&gt;&lt;br /&gt;    switch (listType)&lt;br /&gt;    {&lt;br /&gt;                    case ProductListTypes.New:&lt;br /&gt;                        productList.ListType = listType;&lt;br /&gt;                        productList.Title = npTitle;&lt;br /&gt;                        productList.ContainerTemplate = moduleSettings.NewProducts.ContainerTemplate;&lt;br /&gt;                        productList.ContainerCssClass = "StoreNewProductList";&lt;br /&gt;                        productList.Template = moduleSettings.NewProducts.Template;&lt;br /&gt;                        productList.ItemCssClass = "StoreNewProductItem";&lt;br /&gt;                        productList.AlternatingItemCssClass = "StoreNewProductAlternatingItem";&lt;br /&gt;                        productList.RowCount = int.Parse(moduleSettings.NewProducts.RowCount);&lt;br /&gt;                        productList.ColumnCount = int.Parse(moduleSettings.NewProducts.ColumnCount);&lt;br /&gt;                        productList.ColumnWidth = int.Parse(moduleSettings.NewProducts.ColumnWidth);&lt;br /&gt;                        productList.Direction = moduleSettings.NewProducts.RepeatDirection;&lt;br /&gt;                        productList.ShowThumbnail = bool.Parse(moduleSettings.NewProducts.ShowThumbnail);&lt;br /&gt;                        productList.ThumbnailWidth = int.Parse(moduleSettings.NewProducts.ThumbnailWidth);&lt;br /&gt;                        productList.ShowDetail = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;                        productList.DetailPage = int.Parse(moduleSettings.NewProducts.DetailPage);&lt;br /&gt;                        break;&lt;br /&gt;&lt;br /&gt;     case ProductListTypes.Featured:&lt;br /&gt;                        productList.ListType = listType;&lt;br /&gt;                        productList.Title = fpTitle;&lt;br /&gt;                        productList.ContainerTemplate = moduleSettings.FeaturedProducts.ContainerTemplate;&lt;br /&gt;                        productList.ContainerCssClass = "StoreFeaturedProductList";&lt;br /&gt;      productList.Template = moduleSettings.FeaturedProducts.Template;&lt;br /&gt;                        productList.ItemCssClass = "StoreFeaturedProductItem";&lt;br /&gt;                        productList.AlternatingItemCssClass = "StoreFeaturedProductAlternatingItem";&lt;br /&gt;      productList.RowCount = int.Parse(moduleSettings.FeaturedProducts.RowCount);&lt;br /&gt;      productList.ColumnCount = int.Parse(moduleSettings.FeaturedProducts.ColumnCount);&lt;br /&gt;      productList.ColumnWidth = int.Parse(moduleSettings.FeaturedProducts.ColumnWidth);&lt;br /&gt;                        productList.Direction = moduleSettings.FeaturedProducts.RepeatDirection;&lt;br /&gt;      productList.ShowThumbnail = bool.Parse(moduleSettings.FeaturedProducts.ShowThumbnail);&lt;br /&gt;      productList.ThumbnailWidth = int.Parse(moduleSettings.FeaturedProducts.ThumbnailWidth);&lt;br /&gt;                        productList.ShowDetail = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;      productList.DetailPage = int.Parse(moduleSettings.FeaturedProducts.DetailPage);&lt;br /&gt;      break;&lt;br /&gt;&lt;br /&gt;                    case ProductListTypes.MySearchResult:&lt;br /&gt;                        productList.ListType = listType;&lt;br /&gt;                        productList.Title = MSTitle;&lt;br /&gt;                        productList.ContainerTemplate = moduleSettings.MYSEARCHProducts.ContainerTemplate;&lt;br /&gt;                        productList.ContainerCssClass = "StoreFeaturedProductList";&lt;br /&gt;                        productList.Template = moduleSettings.MYSEARCHProducts.Template;&lt;br /&gt;                        productList.ItemCssClass = "StoreFeaturedProductItem";&lt;br /&gt;                        productList.AlternatingItemCssClass = "StoreFeaturedProductAlternatingItem";&lt;br /&gt;                        productList.RowCount = int.Parse(moduleSettings.MYSEARCHProducts.RowCount);&lt;br /&gt;                        productList.ColumnCount = int.Parse(moduleSettings.MYSEARCHProducts.ColumnCount);&lt;br /&gt;                        productList.ColumnWidth = int.Parse(moduleSettings.MYSEARCHProducts.ColumnWidth);&lt;br /&gt;                        productList.Direction = moduleSettings.MYSEARCHProducts.RepeatDirection;&lt;br /&gt;                        productList.ShowThumbnail = bool.Parse(moduleSettings.MYSEARCHProducts.ShowThumbnail);&lt;br /&gt;                        productList.ThumbnailWidth = int.Parse(moduleSettings.MYSEARCHProducts.ThumbnailWidth);&lt;br /&gt;                        productList.ShowDetail = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;                        productList.DetailPage = int.Parse(moduleSettings.MYSEARCHProducts.DetailPage);&lt;br /&gt;                        break;&lt;br /&gt;&lt;br /&gt;     case ProductListTypes.Popular:&lt;br /&gt;                        productList.ListType = listType;&lt;br /&gt;                        productList.Title = ppTitle;&lt;br /&gt;                        productList.ContainerTemplate = moduleSettings.PopularProducts.ContainerTemplate;&lt;br /&gt;                        productList.ContainerCssClass = "StorePopularProductList";&lt;br /&gt;      productList.Template = moduleSettings.PopularProducts.Template;&lt;br /&gt;                        productList.ItemCssClass = "StorePopularProductItem";&lt;br /&gt;                        productList.AlternatingItemCssClass = "StorePopularProductAlternatingItem";&lt;br /&gt;      productList.RowCount = int.Parse(moduleSettings.PopularProducts.RowCount);&lt;br /&gt;      productList.ColumnCount = int.Parse(moduleSettings.PopularProducts.ColumnCount);&lt;br /&gt;      productList.ColumnWidth = int.Parse(moduleSettings.PopularProducts.ColumnWidth);&lt;br /&gt;                        productList.Direction = moduleSettings.PopularProducts.RepeatDirection;&lt;br /&gt;      productList.ShowThumbnail = bool.Parse(moduleSettings.PopularProducts.ShowThumbnail);&lt;br /&gt;      productList.ThumbnailWidth = int.Parse(moduleSettings.PopularProducts.ThumbnailWidth);&lt;br /&gt;                        productList.ShowDetail = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;      productList.DetailPage = int.Parse(moduleSettings.PopularProducts.DetailPage);&lt;br /&gt;      break;&lt;br /&gt;&lt;br /&gt;     case ProductListTypes.Category:&lt;br /&gt;                        productList.ListType = listType;&lt;br /&gt;                        productList.Title = cpTitle;&lt;br /&gt;                        productList.ContainerTemplate = moduleSettings.CategoryProducts.ContainerTemplate;&lt;br /&gt;                        productList.ContainerCssClass = "StoreCategoryProductList";&lt;br /&gt;      productList.Template = moduleSettings.CategoryProducts.Template;&lt;br /&gt;                        productList.ItemCssClass = "StoreCategoryProductItem";&lt;br /&gt;                        productList.AlternatingItemCssClass = "StoreCategoryProductAlternatingItem";&lt;br /&gt;      productList.RowCount = int.Parse(moduleSettings.CategoryProducts.RowCount);&lt;br /&gt;      productList.ColumnCount = int.Parse(moduleSettings.CategoryProducts.ColumnCount);&lt;br /&gt;      productList.ColumnWidth = int.Parse(moduleSettings.CategoryProducts.ColumnWidth);&lt;br /&gt;                        productList.Direction = moduleSettings.CategoryProducts.RepeatDirection;&lt;br /&gt;      productList.ShowThumbnail = bool.Parse(moduleSettings.CategoryProducts.ShowThumbnail);&lt;br /&gt;      productList.ThumbnailWidth = int.Parse(moduleSettings.CategoryProducts.ThumbnailWidth);&lt;br /&gt;                        productList.ShowDetail = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;      productList.DetailPage = int.Parse(moduleSettings.CategoryProducts.DetailPage);&lt;br /&gt;      break;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    productList.DataSource = products;&lt;br /&gt;    &lt;br /&gt;    return productList;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    return null;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private Control LoadProductDetail()&lt;br /&gt;  {&lt;br /&gt;   ProductDetail productDetail = (ProductDetail)LoadControl(ModulePath + "ProductDetail.ascx");&lt;br /&gt;&lt;br /&gt;   productDetail.ParentControl = this as PortalModuleBase;&lt;br /&gt;            productDetail.ModuleConfiguration = this.ModuleConfiguration;&lt;br /&gt;   productDetail.CategoryID = productInfo.CategoryID;&lt;br /&gt;   productDetail.ShowThumbnail = bool.Parse(moduleSettings.ProductDetail.ShowThumbnail);&lt;br /&gt;   productDetail.ThumbnailWidth = int.Parse(moduleSettings.ProductDetail.ThumbnailWidth);&lt;br /&gt;   productDetail.ShowReviews = bool.Parse(moduleSettings.ProductDetail.ShowReviews);&lt;br /&gt;   productDetail.DataSource = productInfo;&lt;br /&gt;&lt;br /&gt;   return productDetail;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  private ArrayList TruncateList(ArrayList list, int maxCount)&lt;br /&gt;  {&lt;br /&gt;   if (list.Count &amp;gt; maxCount)&lt;br /&gt;   {&lt;br /&gt;    list.RemoveRange(maxCount, list.Count - maxCount);&lt;br /&gt;   }&lt;br /&gt;   return list;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        private string SEO(string seoResource, MetaTags metaType)&lt;br /&gt;        {&lt;br /&gt;            string tempResource = seoResource;&lt;br /&gt;            string tempValue = "";&lt;br /&gt;            MatchCollection matchCol = regTokens.Matches(tempResource);&lt;br /&gt;&lt;br /&gt;            if (matchCol.Count &amp;gt; 0)&lt;br /&gt;            {&lt;br /&gt;                foreach (Match match in matchCol)&lt;br /&gt;                {&lt;br /&gt;                    switch (metaType)&lt;br /&gt;                    {&lt;br /&gt;                        case MetaTags.Title:&lt;br /&gt;                            switch (match.Value.ToUpper())&lt;br /&gt;                            {&lt;br /&gt;                                case "[PAGETITLE]":&lt;br /&gt;                                    tempValue = BasePage.Title;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[STORETITLE]":&lt;br /&gt;                                    tempValue = storeInfo.Name;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[CATEGORYNAME]":&lt;br /&gt;                                    if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = categoryInfo.CategoryName;&lt;br /&gt;                                    }&lt;br /&gt;                                    else&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = "";&lt;br /&gt;                                    }&lt;br /&gt;                                    break;&lt;br /&gt;                                default:&lt;br /&gt;                                    tempValue = match.Value;&lt;br /&gt;                                    break;&lt;br /&gt;                            }&lt;br /&gt;                            break;&lt;br /&gt;                        case MetaTags.Keywords:&lt;br /&gt;                            switch (match.Value.ToUpper())&lt;br /&gt;                            {&lt;br /&gt;                                case "[PAGEKEYWORDS]":&lt;br /&gt;                                    tempValue = BasePage.KeyWords;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[STOREKEYWORDS]":&lt;br /&gt;                                    tempValue = storeInfo.Keywords;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[CATEGORYKEYWORDS]":&lt;br /&gt;                                    if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = categoryInfo.CategoryKeywords;&lt;br /&gt;                                    }&lt;br /&gt;                                    else&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = "";&lt;br /&gt;                                    }&lt;br /&gt;                                    break;&lt;br /&gt;                                default:&lt;br /&gt;                                    tempValue = match.Value;&lt;br /&gt;                                    break;&lt;br /&gt;                            }&lt;br /&gt;                            break;&lt;br /&gt;                        case MetaTags.Description:&lt;br /&gt;                            switch (match.Value.ToUpper())&lt;br /&gt;                            {&lt;br /&gt;                                case "[PAGEDESCRIPTION]":&lt;br /&gt;                                    tempValue = BasePage.Description;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[STOREDESCRIPTION]":&lt;br /&gt;                                    tempValue = storeInfo.Description;&lt;br /&gt;                                    break;&lt;br /&gt;                                case "[CATEGORYDESCRIPTION]":&lt;br /&gt;                                    if (catalogNav.CategoryID != Null.NullInteger)&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = categoryInfo.CategoryDescription;&lt;br /&gt;                                    }&lt;br /&gt;                                    else&lt;br /&gt;                                    {&lt;br /&gt;                                        tempValue = "";&lt;br /&gt;                                    }&lt;br /&gt;                                    break;&lt;br /&gt;                                default:&lt;br /&gt;                                    tempValue = match.Value;&lt;br /&gt;                                    break;&lt;br /&gt;                            }&lt;br /&gt;                            break;&lt;br /&gt;                    }&lt;br /&gt;                    tempResource = tempResource.Replace(match.Value, tempValue);&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            return tempResource.Trim();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;  #region IActionable Members&lt;br /&gt;&lt;br /&gt;  public DotNetNuke.Entities.Modules.Actions.ModuleActionCollection ModuleActions&lt;br /&gt;  {&lt;br /&gt;   get&lt;br /&gt;   {&lt;br /&gt;    ModuleActionCollection actions = new ModuleActionCollection();&lt;br /&gt;                if (storeInfo != null)&lt;br /&gt;                {&lt;br /&gt;                    actions.Add(GetNextActionID(), Localization.GetString("AddNewProduct", this.LocalResourceFile), ModuleActionType.AddContent, "", "", EditUrl("EditID", "Product"), false, SecurityAccessLevel.Edit, true, false);&lt;br /&gt;                }&lt;br /&gt;    return actions; &lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-2.html" style="font-size:18px"&gt;Continue - Part 2 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-5507614794992372309?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/5507614794992372309/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-1.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5507614794992372309'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5507614794992372309'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-1.html' title='dotnetnuke store product search module - part 1'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-2553801907280682743</id><published>2010-01-20T14:12:00.017+05:30</published><updated>2010-01-20T15:22:17.183+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce'/><title type='text'>dotnetnuke store product search module - part 2</title><content type='html'>ProductList.ascx.cs&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;using System;&lt;br /&gt;using System.Globalization;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Collections.Specialized;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using DotNetNuke.Common;&lt;br /&gt;using DotNetNuke.Common.Utilities;&lt;br /&gt;using DotNetNuke.Modules.Store.Admin;&lt;br /&gt;using DotNetNuke.Modules.Store.Catalog;&lt;br /&gt;using DotNetNuke.Modules.Store.Components;&lt;br /&gt;//using DotNetNuke.Modules.Store.Providers.Tax;&lt;br /&gt;using DotNetNuke.Services.Localization;&lt;br /&gt;&lt;br /&gt;namespace DotNetNuke.Modules.Store.WebControls&lt;br /&gt;{&lt;br /&gt; /// &lt;summary&gt;&lt;br /&gt; /// Summary description for Media.&lt;br /&gt; /// &lt;/summary&gt;&lt;br /&gt; public partial class ProductList : StoreControlBase&lt;br /&gt; {&lt;br /&gt;  #region Private Declarations&lt;br /&gt;&lt;br /&gt;        private ModuleSettings moduleSettings;&lt;br /&gt;        private CatalogNavigation moduleNav;&lt;br /&gt;  private ProductInfo productInfo;&lt;br /&gt;        private CategoryController categoryControler;&lt;br /&gt;        private int categoryID = 0;&lt;br /&gt;  private string templatesPath = "";&lt;br /&gt;  private string imagesPath = "";&lt;br /&gt;  private string title = "";&lt;br /&gt;        private string containerTemplate = "";&lt;br /&gt;        private string containerCssClass = "";&lt;br /&gt;  private string template = "";&lt;br /&gt;        private string itemCssClass = "";&lt;br /&gt;        private string alternatingItemCssClass = "";&lt;br /&gt;  private int rowCount = 10;&lt;br /&gt;  private int columnCount = 2;&lt;br /&gt;  private int columnWidth = 200;&lt;br /&gt;        private string direction = "";&lt;br /&gt;  private bool showThumbnail = true;&lt;br /&gt;  private int thumbnailWidth = 90;&lt;br /&gt;  private bool showDetail = true;&lt;br /&gt;  private int detailPageID = 0;&lt;br /&gt;        private ProductListTypes listType;&lt;br /&gt;        private StoreInfo storeInfo;&lt;br /&gt;        private NumberFormatInfo LocalFormat = (NumberFormatInfo)NumberFormatInfo.CurrentInfo.Clone();&lt;br /&gt;        private ArrayList labelsPageInfo = new ArrayList();&lt;br /&gt;        private ArrayList labelsPageNav = new ArrayList();&lt;br /&gt;        private ArrayList buttonsPrevious = new ArrayList();&lt;br /&gt;        private ArrayList buttonsNext = new ArrayList();&lt;br /&gt;        private ArrayList placeholdersPageList = new ArrayList();&lt;br /&gt;        private DataList lstProducts;&lt;br /&gt;&lt;br /&gt;        &lt;br /&gt;&lt;br /&gt;        #endregion&lt;br /&gt;&lt;br /&gt;  #region Public Properties&lt;br /&gt;&lt;br /&gt;  public int CategoryID&lt;br /&gt;  {&lt;br /&gt;   get {return categoryID;}&lt;br /&gt;   set {categoryID = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public string Title&lt;br /&gt;  {&lt;br /&gt;   get {return title;}&lt;br /&gt;   set {title = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public string ContainerTemplate&lt;br /&gt;  {&lt;br /&gt;            get { return containerTemplate; }&lt;br /&gt;            set { containerTemplate = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public string ContainerCssClass&lt;br /&gt;  {&lt;br /&gt;            get { return containerCssClass; }&lt;br /&gt;            set { containerCssClass = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public string Template&lt;br /&gt;  {&lt;br /&gt;   get {return template;}&lt;br /&gt;   set {template = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public string ItemCssClass&lt;br /&gt;  {&lt;br /&gt;            get { return itemCssClass; }&lt;br /&gt;            set { itemCssClass = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public string AlternatingItemCssClass&lt;br /&gt;  {&lt;br /&gt;            get { return alternatingItemCssClass; }&lt;br /&gt;            set { alternatingItemCssClass = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public int RowCount&lt;br /&gt;  {&lt;br /&gt;   get {return rowCount;}&lt;br /&gt;   set {rowCount = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public int ColumnCount&lt;br /&gt;  {&lt;br /&gt;   get {return columnCount;}&lt;br /&gt;   set {columnCount = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public int ColumnWidth&lt;br /&gt;  {&lt;br /&gt;   get {return columnWidth;}&lt;br /&gt;   set {columnWidth = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public string Direction&lt;br /&gt;  {&lt;br /&gt;            get { return direction; }&lt;br /&gt;            set { direction = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public bool ShowThumbnail&lt;br /&gt;  {&lt;br /&gt;   get {return showThumbnail;}&lt;br /&gt;   set {showThumbnail = value;}&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  public int ThumbnailWidth&lt;br /&gt;  {&lt;br /&gt;   get {return thumbnailWidth;}&lt;br /&gt;   set {thumbnailWidth = value;}&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public bool ShowDetail&lt;br /&gt;  {&lt;br /&gt;            get { return showDetail; }&lt;br /&gt;            set { showDetail = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public int DetailPage&lt;br /&gt;  {&lt;br /&gt;   get { return detailPageID; }&lt;br /&gt;   set { detailPageID = value; }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;        public ProductListTypes ListType&lt;br /&gt;        {&lt;br /&gt;            get { return listType; }&lt;br /&gt;            set { listType = value; }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Web Form Designer generated code&lt;br /&gt;  override protected void OnInit(EventArgs e)&lt;br /&gt;  {&lt;br /&gt;   //&lt;br /&gt;   // CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;br /&gt;   //&lt;br /&gt;   InitializeComponent();&lt;br /&gt;   base.OnInit(e);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;  ///  Required method for Designer support - do not modify&lt;br /&gt;  ///  the contents of this method with the code editor.&lt;br /&gt;  /// &lt;/summary&gt;&lt;br /&gt;  private void InitializeComponent()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Events&lt;br /&gt;&lt;br /&gt;  protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;  {&lt;br /&gt;            if (storeInfo == null)&lt;br /&gt;            {&lt;br /&gt;                StoreController storeController = new StoreController();&lt;br /&gt;                storeInfo = storeController.GetStoreInfo(PortalId);&lt;br /&gt;                if (storeInfo.PortalTemplates)&lt;br /&gt;                {&lt;br /&gt;                    templatesPath = PortalSettings.HomeDirectoryMapPath + "Store\\";&lt;br /&gt;                    imagesPath = PortalSettings.HomeDirectory + "Store/Templates/Images/";&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    templatesPath = MapPath(ModulePath);&lt;br /&gt;                    imagesPath = parentControl.ModulePath + "Templates/Images/";&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            if (storeInfo.CurrencySymbol != string.Empty)&lt;br /&gt;            {&lt;br /&gt;                LocalFormat.CurrencySymbol = storeInfo.CurrencySymbol;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            moduleSettings = new ModuleSettings(this.ModuleId, this.TabId);&lt;br /&gt;&lt;br /&gt;            moduleNav = new CatalogNavigation(Request.QueryString);&lt;br /&gt;&lt;br /&gt;            //0 indicates that no detail page is being used, so use current tabid&lt;br /&gt;   if (this.DetailPage == 0) &lt;br /&gt;   {&lt;br /&gt;    this.DetailPage = this.TabId;&lt;br /&gt;   }&lt;br /&gt;   moduleNav.TabId = this.DetailPage;&lt;br /&gt;&lt;br /&gt;   if (moduleNav.PageIndex == Null.NullInteger)&lt;br /&gt;   {&lt;br /&gt;    moduleNav.PageIndex = 1;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;            if (containerTemplate == string.Empty)&lt;br /&gt;            {&lt;br /&gt;                this.Controls.Add(TemplateController.ParseTemplate(templatesPath, "ListContainer.htm", new ProcessTokenDelegate(processToken)));&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;                this.Controls.Add(TemplateController.ParseTemplate(templatesPath, containerTemplate, new ProcessTokenDelegate(processToken)));&lt;br /&gt;            }&lt;br /&gt;            if (lstProducts != null) BindData();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  private void lstProducts_ItemDataBound(object sender, DataListItemEventArgs e)&lt;br /&gt;  {&lt;br /&gt;   productInfo = (ProductInfo)e.Item.DataItem;&lt;br /&gt;&lt;br /&gt;            if (columnWidth &amp;gt; 0)&lt;br /&gt;       e.Item.Width = columnWidth;&lt;br /&gt;            switch (e.Item.ItemType)&lt;br /&gt;            {&lt;br /&gt;                case ListItemType.Item:&lt;br /&gt;                    e.Item.CssClass = itemCssClass;&lt;br /&gt;                    break;&lt;br /&gt;                case ListItemType.AlternatingItem:&lt;br /&gt;                    e.Item.CssClass = alternatingItemCssClass;&lt;br /&gt;                    break;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            ProductDetail productListItem = (ProductDetail)LoadControl(ModulePath + "ProductDetail.ascx");&lt;br /&gt;            productListItem.Template = template;&lt;br /&gt;            productListItem.ParentControl = this.ParentControl;&lt;br /&gt;            productListItem.CategoryID = productInfo.CategoryID;&lt;br /&gt;            productListItem.ShowThumbnail = ShowThumbnail;&lt;br /&gt;            productListItem.ThumbnailWidth = ThumbnailWidth;&lt;br /&gt;            productListItem.DataSource = productInfo;&lt;br /&gt;            productListItem.ShowDetail = (showDetail == false) &amp;amp; (detailPageID == Null.NullInteger) ? false : true;&lt;br /&gt;            productListItem.DetailID = detailPageID;&lt;br /&gt;            productListItem.InList = true;&lt;br /&gt;&lt;br /&gt;            e.Item.Controls.Add(productListItem);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Protected Functions&lt;br /&gt;&lt;br /&gt;  protected void BindData()&lt;br /&gt;  {&lt;br /&gt;   PagedDataSource pagedData = null;&lt;br /&gt;&lt;br /&gt;   // Get the product data&lt;br /&gt;   ArrayList productArray = (dataSource as ArrayList);&lt;br /&gt;   if ((productArray == null) || (productArray.Count == 0))&lt;br /&gt;   {&lt;br /&gt;                foreach (Label lblPageNav in labelsPageNav)&lt;br /&gt;                {&lt;br /&gt;                    lblPageNav.Visible = false;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;    int itemCount  = productArray.Count;&lt;br /&gt;    int pageSize  = rowCount * columnCount;&lt;br /&gt;    int currentPage  = moduleNav.PageIndex - 1; // Convert to zero-based index&lt;br /&gt;&lt;br /&gt;                foreach (Label lblPageNav in labelsPageNav)&lt;br /&gt;                {&lt;br /&gt;                    lblPageNav.Visible = true;&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;    // Created paged data source&lt;br /&gt;    pagedData = new PagedDataSource();&lt;br /&gt;                if (ViewState["productArray"] != null &amp;amp;&amp;amp; IsPostBack)&lt;br /&gt;                {&lt;br /&gt;                    pagedData.DataSource = (ArrayList)ViewState["productArray"];&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    pagedData.DataSource = productArray;&lt;br /&gt;                    ViewState["productArray"] = pagedData.DataSource;&lt;br /&gt;                }&lt;br /&gt;    pagedData.AllowPaging = true;&lt;br /&gt;    pagedData.PageSize = pageSize;&lt;br /&gt;    pagedData.CurrentPageIndex = currentPage;&lt;br /&gt;&lt;br /&gt;    UpdatePagingControls(itemCount, pageSize, moduleNav.PageIndex);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   // Databind with product list&lt;br /&gt;            if (lstProducts != null)&lt;br /&gt;            {&lt;br /&gt;                lstProducts.DataSource = pagedData;&lt;br /&gt;                lstProducts.DataBind();&lt;br /&gt;&lt;br /&gt;                if (lstProducts.Items.Count == 0)&lt;br /&gt;                {&lt;br /&gt;                    this.Visible = false;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;  protected void UpdatePagingControls(int itemCount, int pageSize, int currentPage)&lt;br /&gt;  {&lt;br /&gt;   StringDictionary replaceParams = new StringDictionary();&lt;br /&gt;&lt;br /&gt;   // Get total pages&lt;br /&gt;   int rem;&lt;br /&gt;   int totalPages = Math.DivRem(itemCount, pageSize, out rem);&lt;br /&gt;   if (rem &amp;gt; 0)&lt;br /&gt;   {&lt;br /&gt;    totalPages++;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   // Hide and return if only one page&lt;br /&gt;   if (totalPages == 1)&lt;br /&gt;   {&lt;br /&gt;                foreach (Label lblPageNav in labelsPageNav)&lt;br /&gt;                {&lt;br /&gt;                    lblPageNav.Visible = false;&lt;br /&gt;                }&lt;br /&gt;                return;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   ////////////////////////////&lt;br /&gt;   // Previous/Next Buttons&lt;br /&gt;&lt;br /&gt;   int prevIndex = currentPage - 1;&lt;br /&gt;   if ((prevIndex &amp;lt; 1) || (prevIndex &amp;gt; totalPages))&lt;br /&gt;   {&lt;br /&gt;    prevIndex = 1;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   replaceParams["PageIndex"] = prevIndex.ToString();&lt;br /&gt;            foreach (HyperLink btnPrev in buttonsPrevious)&lt;br /&gt;            {&lt;br /&gt;                btnPrev.NavigateUrl = moduleNav.GetNavigationUrl(replaceParams, storeInfo.StorePageID);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;   int nextIndex = currentPage + 1;&lt;br /&gt;   if (nextIndex &amp;gt;= totalPages)&lt;br /&gt;   {&lt;br /&gt;    nextIndex = totalPages;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   replaceParams["PageIndex"] = nextIndex.ToString();&lt;br /&gt;            foreach (HyperLink btnNext in buttonsNext)&lt;br /&gt;            {&lt;br /&gt;                btnNext.NavigateUrl = moduleNav.GetNavigationUrl(replaceParams, storeInfo.StorePageID);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;   ////////////////////////////&lt;br /&gt;   // Page Index List&lt;br /&gt;&lt;br /&gt;   // Determine page range to display&lt;br /&gt;   int rangeMin = currentPage - 10;&lt;br /&gt;   int rangeMax = currentPage + 10;&lt;br /&gt;&lt;br /&gt;   if (rangeMin &amp;lt; 1)&lt;br /&gt;   {&lt;br /&gt;    rangeMax = rangeMax + Math.Abs(rangeMin) + 1;&lt;br /&gt;    rangeMin = 1;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   if (rangeMax &amp;gt;= totalPages)&lt;br /&gt;   {&lt;br /&gt;    rangeMin = rangeMin - (rangeMax - totalPages);&lt;br /&gt;    if (rangeMin &amp;lt;= 1)&lt;br /&gt;    {&lt;br /&gt;     rangeMin = 1;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    rangeMax = totalPages;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;            foreach (PlaceHolder phPageList in placeholdersPageList)&lt;br /&gt;            {&lt;br /&gt;                // Create link for each page&lt;br /&gt;                for (int i = rangeMin; i &amp;lt;= rangeMax; i++)&lt;br /&gt;                {&lt;br /&gt;                    replaceParams["PageIndex"] = i.ToString();&lt;br /&gt;&lt;br /&gt;                    if (i == currentPage)&lt;br /&gt;                    {&lt;br /&gt;                        Label pageLabel = new Label();&lt;br /&gt;                        pageLabel.Text = i.ToString();&lt;br /&gt;                        pageLabel.CssClass = "StoreCurrentPageNumber";&lt;br /&gt;                        phPageList.Controls.Add(pageLabel);&lt;br /&gt;                        phPageList.Controls.Add(new LiteralControl("&amp;nbsp;&amp;nbsp;"));&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        HyperLink pageLink = new HyperLink();&lt;br /&gt;                        pageLink.Text = i.ToString();&lt;br /&gt;                        pageLink.NavigateUrl = moduleNav.GetNavigationUrl(replaceParams, storeInfo.StorePageID);&lt;br /&gt;                        pageLink.CssClass = "StorePageNumber";&lt;br /&gt;&lt;br /&gt;                        phPageList.Controls.Add(pageLink);&lt;br /&gt;                        phPageList.Controls.Add(new LiteralControl("&amp;nbsp;&amp;nbsp;"));&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;            foreach (Label lblPageInfo in labelsPageInfo)&lt;br /&gt;            {&lt;br /&gt;                lblPageInfo.Text = string.Format(Localization.GetString("PageInfo.Text", this.LocalResourceFile), currentPage, totalPages);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        protected void ddlSortBy_SelectedIndexChanged(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            DropDownList ddlSortBy = (sender as DropDownList);&lt;br /&gt;            if (ddlSortBy != null)&lt;br /&gt;            {&lt;br /&gt;                moduleNav.SortID = int.Parse(ddlSortBy.SelectedValue);&lt;br /&gt;                moduleNav.SortDir = "ASC";&lt;br /&gt;                moduleNav.PageIndex = Null.NullInteger;&lt;br /&gt;            }&lt;br /&gt;            Response.Redirect(moduleNav.GetNavigationUrl());&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void btnSortDir_Click(object sender, ImageClickEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            ImageButton button = (sender as ImageButton);&lt;br /&gt;            if (button != null)&lt;br /&gt;            {&lt;br /&gt;                moduleNav.PageIndex = Null.NullInteger;&lt;br /&gt;                if (button.CommandArgument.ToUpper() == "ASC")&lt;br /&gt;                {&lt;br /&gt;                    moduleNav.SortDir = "DESC";&lt;br /&gt;                }&lt;br /&gt;                else&lt;br /&gt;                {&lt;br /&gt;                    moduleNav.SortDir = "ASC";&lt;br /&gt;                }&lt;br /&gt;                Response.Redirect(moduleNav.GetNavigationUrl());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void btnMYSEARCH_Click(object sender, ImageClickEventArgs e)&lt;br /&gt;        {&lt;br /&gt;            //ImageButton button_Myserch = (sender as ImageButton);&lt;br /&gt;            ImageButton button_Myserch = sender as ImageButton;&lt;br /&gt;            if (button_Myserch != null)&lt;br /&gt;            {&lt;br /&gt;                moduleNav.PageIndex = Null.NullInteger;&lt;br /&gt;&lt;br /&gt;                    moduleNav.SortDir = "DESC";&lt;br /&gt;&lt;br /&gt;                    DropDownList ddlMYSEARCH = (DropDownList)this.FindControl("ddMYSEARCH");&lt;br /&gt;                    TextBox txtMYSEARCH = (TextBox)this.FindControl("txtMYSEARCH");&lt;br /&gt;&lt;br /&gt;                    if (ddlMYSEARCH != null &amp;amp;&amp;amp; txtMYSEARCH != null)&lt;br /&gt;                    //&amp;amp;&amp;amp; ddlMYSEARCH.SelectedValue.ToString() != null &amp;amp;&amp;amp; txtMYSEARCH.Text.ToString() != null&lt;br /&gt;                    {&lt;br /&gt;                        moduleNav.SearchField = ddlMYSEARCH.SelectedValue.ToString();&lt;br /&gt;                        moduleNav.SearchText = txtMYSEARCH.Text.ToString();&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                    {&lt;br /&gt;                        moduleNav.SearchField = "Manufacturer";&lt;br /&gt;                        moduleNav.SearchText = "JK";&lt;br /&gt;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                Response.Redirect(moduleNav.GetNavigationUrl());&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Private Functions&lt;br /&gt;&lt;br /&gt;  private Control processToken(string tokenName)&lt;br /&gt;  {&lt;br /&gt;   switch (tokenName.ToUpper())&lt;br /&gt;   {&lt;br /&gt;                case "LISTTITLE":&lt;br /&gt;                    Label lblTitle = new Label();&lt;br /&gt;                    lblTitle.CssClass = "StoreListTitle";&lt;br /&gt;                    lblTitle.Text = title;&lt;br /&gt;                    return lblTitle;&lt;br /&gt;&lt;br /&gt;                case "PAGENAV":&lt;br /&gt;                    if (ListType == ProductListTypes.Category || &lt;br /&gt;                        ListType == ProductListTypes.MySearchResult)&lt;br /&gt;                    {&lt;br /&gt;                        HyperLink btnPrevious = new HyperLink();&lt;br /&gt;                        btnPrevious.Text = Localization.GetString("Previous.Text", this.LocalResourceFile);&lt;br /&gt;                        btnPrevious.CssClass = "StorePagePrevious";&lt;br /&gt;                        buttonsPrevious.Add(btnPrevious);&lt;br /&gt;&lt;br /&gt;                        Literal lblSpace = new Literal();&lt;br /&gt;                        lblSpace.Text = "&amp;nbsp;&amp;nbsp;";&lt;br /&gt;&lt;br /&gt;                        HyperLink btnNext = new HyperLink();&lt;br /&gt;                        btnNext.Text = Localization.GetString("Next.Text", this.LocalResourceFile);&lt;br /&gt;                        btnNext.CssClass = "StorePageNext";&lt;br /&gt;                        buttonsNext.Add(btnNext);&lt;br /&gt;&lt;br /&gt;                        PlaceHolder phPageList = new PlaceHolder();&lt;br /&gt;                        placeholdersPageList.Add(phPageList);&lt;br /&gt;&lt;br /&gt;                        Label lblPageNav = new Label();&lt;br /&gt;                        lblPageNav.Controls.Add(btnPrevious);&lt;br /&gt;                        lblPageNav.Controls.Add(lblSpace);&lt;br /&gt;                        lblPageNav.Controls.Add(phPageList);&lt;br /&gt;                        lblPageNav.Controls.Add(btnNext);&lt;br /&gt;                        lblPageNav.CssClass = "StorePageNav";&lt;br /&gt;                        labelsPageNav.Add(lblPageNav);&lt;br /&gt;                        return lblPageNav;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;                case "PAGEINFO":&lt;br /&gt;                    Label lblPageInfo = new Label();&lt;br /&gt;                    lblPageInfo.CssClass = "StorePageInfo";&lt;br /&gt;                    lblPageInfo.Text = string.Format(Localization.GetString("PageInfo.Text", this.LocalResourceFile), 1, 1);&lt;br /&gt;                    labelsPageInfo.Add(lblPageInfo);&lt;br /&gt;                    return lblPageInfo;&lt;br /&gt;&lt;br /&gt;                case "PRODUCTS":&lt;br /&gt;                    lstProducts = new DataList();&lt;br /&gt;                    lstProducts.CssClass = containerCssClass;&lt;br /&gt;                    lstProducts.RepeatLayout = RepeatLayout.Table;&lt;br /&gt;                    switch (direction)&lt;br /&gt;                    {&lt;br /&gt;                        case "V":&lt;br /&gt;                            lstProducts.RepeatDirection = RepeatDirection.Vertical;&lt;br /&gt;                            break;&lt;br /&gt;                        case "H":&lt;br /&gt;                        default:&lt;br /&gt;                            lstProducts.RepeatDirection = RepeatDirection.Horizontal;&lt;br /&gt;                            break;&lt;br /&gt;                    }&lt;br /&gt;                    lstProducts.RepeatColumns = columnCount;&lt;br /&gt;                    lstProducts.ItemDataBound += new DataListItemEventHandler(lstProducts_ItemDataBound);&lt;br /&gt;                    return lstProducts;&lt;br /&gt;&lt;br /&gt;                case "ITEMSCOUNT":&lt;br /&gt;                    if (dataSource != null)&lt;br /&gt;                    {&lt;br /&gt;                        Label lblItems = new Label();&lt;br /&gt;                        lblItems.CssClass = "StoreItemsCount";&lt;br /&gt;                        lblItems.Text = string.Format(Localization.GetString("ItemsCount.Text", this.LocalResourceFile), (dataSource as ArrayList).Count);&lt;br /&gt;                        return lblItems;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;                case "SELECTEDCATEGORY":&lt;br /&gt;                    if (ListType == ProductListTypes.Category)&lt;br /&gt;                    {&lt;br /&gt;                        categoryControler = new CategoryController();&lt;br /&gt;                        CategoryInfo categoryInfo = categoryControler.GetCategory(CategoryID);&lt;br /&gt;                        if (categoryInfo != null)&lt;br /&gt;                        {&lt;br /&gt;                            Label lblProductCategory = new Label();&lt;br /&gt;                            lblProductCategory.Text = string.Format(Localization.GetString("SelectedCategory.Text", this.LocalResourceFile), categoryInfo.CategoryName);&lt;br /&gt;                            lblProductCategory.CssClass = "StoreSelectedCategory";&lt;br /&gt;                            return lblProductCategory;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                            return null;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;                case "CATEGORIESBREADCRUMB":&lt;br /&gt;                    if (ListType == ProductListTypes.Category || ListType == ProductListTypes.MySearchResult)&lt;br /&gt;                    {&lt;br /&gt;                        categoryControler = new CategoryController();&lt;br /&gt;                        CategoryInfo categoryInfo = categoryControler.GetCategory(CategoryID);&lt;br /&gt;                        if (categoryInfo != null)&lt;br /&gt;                        {&lt;br /&gt;                            string categoryName = categoryInfo.CategoryName;&lt;br /&gt;                            bool hasParent = categoryInfo.ParentCategoryID != Null.NullInteger;&lt;br /&gt;                            // Create label to contains all other controls&lt;br /&gt;                            Label lblCategoriesBreadcrumb = new Label();&lt;br /&gt;                            lblCategoriesBreadcrumb.CssClass = "StoreCategoriesBreadcrumb";&lt;br /&gt;                            // Create "before" label with locale resource&lt;br /&gt;                            Label lblBeforeBreadcrumb = new Label();&lt;br /&gt;                            lblBeforeBreadcrumb.Text = Localization.GetString("BeforeCategoriesBreadcrumb", this.LocalResourceFile);&lt;br /&gt;                            lblBeforeBreadcrumb.CssClass = "StoreBeforeBreadcrumb";&lt;br /&gt;                            lblCategoriesBreadcrumb.Controls.Add(lblBeforeBreadcrumb);&lt;br /&gt;                            // Create "between" label with locale resource&lt;br /&gt;                            Literal litBetwenBreadcrumb = new Literal();&lt;br /&gt;                            litBetwenBreadcrumb.Text = Localization.GetString("BetweenCategoriesBreadcrumb", this.LocalResourceFile);&lt;br /&gt;                            // Create label to contains categories&lt;br /&gt;                            Label lblBreadcrumb = new Label();&lt;br /&gt;                            lblBreadcrumb.CssClass = "StoreBreadcrumb";&lt;br /&gt;                            lblCategoriesBreadcrumb.Controls.Add(lblBreadcrumb);&lt;br /&gt;                            int parentCategoryID = categoryInfo.ParentCategoryID;&lt;br /&gt;                            // Create catalog navigation object to compute hyperlink URL&lt;br /&gt;                            CatalogNavigation categogyNav = new CatalogNavigation();&lt;br /&gt;                            categogyNav.TabId = this.TabId;&lt;br /&gt;                            // Loop for parent categories&lt;br /&gt;                            while (parentCategoryID != Null.NullInteger)&lt;br /&gt;                            {&lt;br /&gt;                                categoryInfo = categoryControler.GetCategory(categoryInfo.ParentCategoryID);&lt;br /&gt;                                if (categoryInfo != null)&lt;br /&gt;                                {&lt;br /&gt;                                    parentCategoryID = categoryInfo.ParentCategoryID;&lt;br /&gt;                                    if (parentCategoryID != Null.NullInteger)&lt;br /&gt;                                    {&lt;br /&gt;                                        lblBreadcrumb.Controls.Add(litBetwenBreadcrumb);&lt;br /&gt;                                    }&lt;br /&gt;                                    // Create hyperlink with the parent category&lt;br /&gt;                                    HyperLink hlCategory = new HyperLink();&lt;br /&gt;                                    hlCategory.Text = categoryInfo.CategoryName;&lt;br /&gt;                                    categogyNav.CategoryID = categoryInfo.CategoryID;&lt;br /&gt;                                    hlCategory.NavigateUrl = categogyNav.GetNavigationUrl();&lt;br /&gt;                                    lblBreadcrumb.Controls.Add(hlCategory);&lt;br /&gt;                                }&lt;br /&gt;                                else&lt;br /&gt;                                    parentCategoryID = Null.NullInteger;&lt;br /&gt;                            }&lt;br /&gt;                            // Insert separator if parent exist&lt;br /&gt;                            if (hasParent)&lt;br /&gt;                            {&lt;br /&gt;                                lblBreadcrumb.Controls.Add(litBetwenBreadcrumb);&lt;br /&gt;                            }&lt;br /&gt;                            // Create literal with selected category name&lt;br /&gt;                            Literal litSelectedCategory = new Literal();&lt;br /&gt;                            litSelectedCategory.Text = categoryName;&lt;br /&gt;                            lblBreadcrumb.Controls.Add(litSelectedCategory);&lt;br /&gt;                            // Create "after" label with locale resource&lt;br /&gt;                            Label lblAfterBreadcrumb = new Label();&lt;br /&gt;                            lblAfterBreadcrumb.Text = Localization.GetString("AfterCategoriesBreadcrumb", this.LocalResourceFile);&lt;br /&gt;                            lblAfterBreadcrumb.CssClass = "StoreAfterBreadcrumb";&lt;br /&gt;                            lblCategoriesBreadcrumb.Controls.Add(lblAfterBreadcrumb);&lt;br /&gt;                            return lblCategoriesBreadcrumb;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                            return null;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;                case "SORTBY":&lt;br /&gt;                    if (ListType == ProductListTypes.Category)&lt;br /&gt;                    {&lt;br /&gt;                        // Create label to contains all other controls&lt;br /&gt;                        Label lblSortBy = new Label();&lt;br /&gt;                        lblSortBy.CssClass = "StoreSortBy";&lt;br /&gt;                        // Create literal text with locale resource&lt;br /&gt;                        Literal litSortBy = new Literal();&lt;br /&gt;                        litSortBy.Text = Localization.GetString("SortBy", this.LocalResourceFile);&lt;br /&gt;                        lblSortBy.Controls.Add(litSortBy);&lt;br /&gt;                        // Create DropDownList with column names&lt;br /&gt;                        DropDownList ddlSortBy = new DropDownList();&lt;br /&gt;                        ddlSortBy.AutoPostBack = true;&lt;br /&gt;                        ddlSortBy.Items.Add(new ListItem(Localization.GetString("SortManufacturer", this.LocalResourceFile), "0"));&lt;br /&gt;                        ddlSortBy.Items.Add(new ListItem(Localization.GetString("SortModelNumber", this.LocalResourceFile), "1"));&lt;br /&gt;                        ddlSortBy.Items.Add(new ListItem(Localization.GetString("SortModelName", this.LocalResourceFile), "2"));&lt;br /&gt;                        ddlSortBy.Items.Add(new ListItem(Localization.GetString("SortUnitPrice", this.LocalResourceFile), "3"));&lt;br /&gt;                        if (moduleNav.SortID != Null.NullInteger)&lt;br /&gt;                        {&lt;br /&gt;                            // Currently selected sort column&lt;br /&gt;                            ddlSortBy.SelectedIndex = moduleNav.SortID;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            // Default sort column&lt;br /&gt;                            ddlSortBy.SelectedValue = moduleSettings.CategoryProducts.SortBy;&lt;br /&gt;                        }&lt;br /&gt;                        ddlSortBy.SelectedIndexChanged += new EventHandler(ddlSortBy_SelectedIndexChanged);&lt;br /&gt;                        lblSortBy.Controls.Add(ddlSortBy);&lt;br /&gt;&lt;br /&gt;                        // Create Sort Order image button&lt;br /&gt;                        ImageButton btnSortDir = new ImageButton();&lt;br /&gt;                        string sortDir;&lt;br /&gt;                        if (moduleNav.SortDir != Null.NullString)&lt;br /&gt;                        {&lt;br /&gt;                            // Currently selected sort direction&lt;br /&gt;                            sortDir = moduleNav.SortDir;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            // Default sort direction&lt;br /&gt;                            sortDir = moduleSettings.CategoryProducts.SortDir;&lt;br /&gt;                        }&lt;br /&gt;                        string imageName;&lt;br /&gt;                        string altText;&lt;br /&gt;                        if (sortDir.ToUpper() == "ASC")&lt;br /&gt;                        {&lt;br /&gt;                            imageName = "arrow_up.png";&lt;br /&gt;                            altText = Localization.GetString("SortAscending", this.LocalResourceFile);&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            imageName = "arrow_down.png";&lt;br /&gt;                            altText = Localization.GetString("SortDescending", this.LocalResourceFile);&lt;br /&gt;                        }&lt;br /&gt;                        btnSortDir.CommandArgument = sortDir;&lt;br /&gt;                        btnSortDir.AlternateText = altText;&lt;br /&gt;                        if (storeInfo.PortalTemplates)&lt;br /&gt;                        {&lt;br /&gt;                            btnSortDir.ImageUrl = PortalSettings.HomeDirectory + "Store/Templates/Images/" + imageName;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            btnSortDir.ImageUrl = this.TemplateSourceDirectory + "/Templates/Images/" + imageName;&lt;br /&gt;                        }&lt;br /&gt;                        btnSortDir.Click += new ImageClickEventHandler(btnSortDir_Click);&lt;br /&gt;                        lblSortBy.Controls.Add(btnSortDir);&lt;br /&gt;                        return lblSortBy;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                case "MYSEARCH":&lt;br /&gt;                    if (ListType == ProductListTypes.Category)&lt;br /&gt;                    {&lt;br /&gt;                        // Create label to contains all other controls&lt;br /&gt;                        Label lblMYSEARCH = new Label();&lt;br /&gt;                        lblMYSEARCH.CssClass = "StoreSearchLable";&lt;br /&gt;                        // Create literal text with locale resource&lt;br /&gt;                        Literal litMYSEARCH = new Literal();&lt;br /&gt;                        litMYSEARCH.Text = Localization.GetString("MYSEARCHBy", this.LocalResourceFile);&lt;br /&gt;                        lblMYSEARCH.Controls.Add(litMYSEARCH);&lt;br /&gt;&lt;br /&gt;                        // Create DropDownList with column names&lt;br /&gt;                        DropDownList ddlMYSEARCH = new DropDownList();&lt;br /&gt;                        ddlMYSEARCH.ID = "ddMYSEARCH";&lt;br /&gt;                        ddlMYSEARCH.CssClass = "ddlMySearch";&lt;br /&gt;&lt;br /&gt;                        ddlMYSEARCH.AutoPostBack = false;&lt;br /&gt;                        ddlMYSEARCH.Items.Add(new ListItem(Localization.GetString("MYSEARCHManufacturer", this.LocalResourceFile), "Manufacturer"));&lt;br /&gt;                        ddlMYSEARCH.Items.Add(new ListItem(Localization.GetString("MYSEARCHModelNumber", this.LocalResourceFile), "ModelNumber"));&lt;br /&gt;                        ddlMYSEARCH.Items.Add(new ListItem(Localization.GetString("MYSEARCHModelName", this.LocalResourceFile), "ModelName"));&lt;br /&gt;&lt;br /&gt;                        if (moduleNav.SearchField != Null.NullString)//Null.NullInteger&lt;br /&gt;                        {&lt;br /&gt;                            // Currently selected Search column&lt;br /&gt;          ddlMYSEARCH.SelectedValue = moduleNav.SearchField.ToString();&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        &lt;br /&gt;&lt;br /&gt;                        lblMYSEARCH.Controls.Add(ddlMYSEARCH);&lt;br /&gt;                        &lt;br /&gt;                        TextBox txtMYSEARCH = new TextBox();&lt;br /&gt;                        txtMYSEARCH.ID = "txtMYSEARCH";&lt;br /&gt;                        txtMYSEARCH.CssClass = "txtMySearch";&lt;br /&gt;&lt;br /&gt;                        txtMYSEARCH.AutoPostBack = false;&lt;br /&gt;&lt;br /&gt;                        if (moduleNav.SearchText != Null.NullString)&lt;br /&gt;                        {&lt;br /&gt;                            txtMYSEARCH.Text = moduleNav.SearchText;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        // Create Searching image button&lt;br /&gt;                        ImageButton btnMYSEARCH = new ImageButton();&lt;br /&gt;                        &lt;br /&gt;                        string imageName;&lt;br /&gt;                        string altText;&lt;br /&gt;&lt;br /&gt;                        string searching_field = ddlMYSEARCH.SelectedValue.ToString();&lt;br /&gt;                        string searching_Text = txtMYSEARCH.Text.ToString();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                            imageName = "Search_button.png";&lt;br /&gt;                            altText = Localization.GetString("SearchButtonAlt", this.LocalResourceFile);&lt;br /&gt;                        &lt;br /&gt;                        btnMYSEARCH.AlternateText = altText;&lt;br /&gt;                        if (storeInfo.PortalTemplates)&lt;br /&gt;                        {&lt;br /&gt;                            btnMYSEARCH.ImageUrl = PortalSettings.HomeDirectory + "Store/Templates/Images/" + imageName;&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            btnMYSEARCH.ImageUrl = this.TemplateSourceDirectory + "/Templates/Images/" + imageName;&lt;br /&gt;                        }&lt;br /&gt;&lt;br /&gt;                        lblMYSEARCH.Controls.Add(txtMYSEARCH);&lt;br /&gt;                        lblMYSEARCH.Controls.Add(btnMYSEARCH);&lt;br /&gt;                        btnMYSEARCH.Click += new ImageClickEventHandler(btnMYSEARCH_Click);&lt;br /&gt;&lt;br /&gt;                        return lblMYSEARCH;&lt;br /&gt;                    }&lt;br /&gt;                    else&lt;br /&gt;                        return null;&lt;br /&gt;&lt;br /&gt;    default:&lt;br /&gt;     LiteralControl litText = new LiteralControl(tokenName);&lt;br /&gt;     return litText;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-3.html" style="font-size:18px"&gt;Continue - Part 3 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-2553801907280682743?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/2553801907280682743/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/2553801907280682743'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/2553801907280682743'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-2.html' title='dotnetnuke store product search module - part 2'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-3335602330360581009</id><published>2010-01-20T14:12:00.016+05:30</published><updated>2010-01-20T15:22:07.801+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce'/><title type='text'>dotnetnuke store product search module - part 3</title><content type='html'>CatalogSettings.ascx.cs&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;using System;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;using DotNetNuke;&lt;br /&gt;using DotNetNuke.Common;&lt;br /&gt;using DotNetNuke.Entities.Portals;&lt;br /&gt;using DotNetNuke.Entities.Tabs;&lt;br /&gt;using DotNetNuke.Modules.Store.Admin;&lt;br /&gt;using DotNetNuke.Modules.Store.Catalog;&lt;br /&gt;using DotNetNuke.Security;&lt;br /&gt;using DotNetNuke.Security.Roles;&lt;br /&gt;using DotNetNuke.Services.Exceptions;&lt;br /&gt;using DotNetNuke.Services.Localization;&lt;br /&gt;&lt;br /&gt;namespace DotNetNuke.Modules.Store.WebControls&lt;br /&gt;{&lt;br /&gt; /// &lt;summary&gt;&lt;br /&gt; /// Summary description for Settings.&lt;br /&gt; /// &lt;/summary&gt;&lt;br /&gt;    public partial class CatalogSettings : DotNetNuke.Entities.Modules.ModuleSettingsBase&lt;br /&gt; {&lt;br /&gt;  protected ModuleSettings moduleSettings;&lt;br /&gt;        private StoreInfo storeInfo;&lt;br /&gt;        private string templatesPath = "";&lt;br /&gt;&lt;br /&gt;  #region Web Form Designer generated code&lt;br /&gt;  override protected void OnInit(EventArgs e)&lt;br /&gt;  {&lt;br /&gt;   //&lt;br /&gt;   // CODEGEN: This call is required by the ASP.NET Web Form Designer.&lt;br /&gt;   //&lt;br /&gt;   InitializeComponent();&lt;br /&gt;   base.OnInit(e);&lt;br /&gt;&lt;br /&gt;   moduleSettings = new ModuleSettings(this.ModuleId,  this.TabId);&lt;br /&gt;  }&lt;br /&gt;  &lt;br /&gt;  /// &lt;summary&gt;&lt;br /&gt;  ///  Required method for Designer support - do not modify&lt;br /&gt;  ///  the contents of this method with the code editor.&lt;br /&gt;  /// &lt;/summary&gt;&lt;br /&gt;  private void InitializeComponent()&lt;br /&gt;  {&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Events&lt;br /&gt;  protected void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;  {&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    if (!Page.IsPostBack)&lt;br /&gt;    {&lt;br /&gt;                    CategoryController categoryController = new CategoryController();&lt;br /&gt;     ArrayList categoryList = categoryController.GetCategories(this.PortalId, false, -1);&lt;br /&gt;     bool defaultExists = false;&lt;br /&gt;&lt;br /&gt;                    lstDefaultCategory.Items.Add(new ListItem(Localization.GetString("SelectDefaultCategory", this.LocalResourceFile), "-1"));&lt;br /&gt;&lt;br /&gt;     foreach (CategoryInfo categoryInfo in categoryList)&lt;br /&gt;     {&lt;br /&gt;      lstDefaultCategory.Items.Add(new ListItem(categoryInfo.CategoryName, categoryInfo.CategoryID.ToString()));&lt;br /&gt;&lt;br /&gt;      if (categoryInfo.CategoryID.ToString() == moduleSettings.General.DefaultCategoryID)&lt;br /&gt;      {&lt;br /&gt;       defaultExists = true;&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     if (lstDefaultCategory.Items.Count &amp;gt; 1 &amp;amp;&amp;amp; Int32.Parse(moduleSettings.General.DefaultCategoryID) &amp;gt; 0 &amp;amp;&amp;amp; defaultExists)&lt;br /&gt;     {&lt;br /&gt;      lstDefaultCategory.SelectedValue = moduleSettings.General.DefaultCategoryID;&lt;br /&gt;     }&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   catch(Exception ex)&lt;br /&gt;   {&lt;br /&gt;    Exceptions.ProcessModuleLoadException(this, ex);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Base Method Implementations&lt;br /&gt;  public override void LoadSettings()&lt;br /&gt;  {&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    if (!Page.IsPostBack)&lt;br /&gt;    {&lt;br /&gt;                    if (storeInfo == null)&lt;br /&gt;                    {&lt;br /&gt;                        StoreController storeController = new StoreController();&lt;br /&gt;                        storeInfo = storeController.GetStoreInfo(PortalId);&lt;br /&gt;                        if (storeInfo.PortalTemplates)&lt;br /&gt;                        {&lt;br /&gt;                            templatesPath = PortalSettings.HomeDirectoryMapPath + "Store\\";&lt;br /&gt;                        }&lt;br /&gt;                        else&lt;br /&gt;                        {&lt;br /&gt;                            templatesPath = MapPath(ModulePath) + "\\";&lt;br /&gt;                        }&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    // Add tab name to combo boxes (Detail Page and Return Page) for each section&lt;br /&gt;     TabController tabController = new TabController();&lt;br /&gt;     ArrayList tabs = tabController.GetTabs(PortalId);&lt;br /&gt;&lt;br /&gt;                    lstNPLDetailPage.Items.Add(new ListItem(Localization.GetString("NPLSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;                    lstFPLDetailPage.Items.Add(new ListItem(Localization.GetString("FPLSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;                    lstMSLDetailPage.Items.Add(new ListItem(Localization.GetString("MSLSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;                    lstPPLDetailPage.Items.Add(new ListItem(Localization.GetString("PPLSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;                    lstCPLDetailPage.Items.Add(new ListItem(Localization.GetString("CPLSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;                    lstPDSReturnPage.Items.Add(new ListItem(Localization.GetString("PDSSamePage", this.LocalResourceFile), "0"));&lt;br /&gt;&lt;br /&gt;     foreach (TabInfo tabInfo in tabs)&lt;br /&gt;     {&lt;br /&gt;      if (!tabInfo.IsDeleted &amp;amp;&amp;amp; !tabInfo.IsAdminTab &amp;amp;&amp;amp; !tabInfo.IsSuperTab)&lt;br /&gt;      {&lt;br /&gt;                            lstNPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;                            lstFPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;                            lstMSLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;       lstPPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;       lstCPLDetailPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;                            lstPDSReturnPage.Items.Add(new ListItem(tabInfo.TabName, tabInfo.TabID.ToString()));&lt;br /&gt;      }&lt;br /&gt;     }&lt;br /&gt;     &lt;br /&gt;     loadTemplates();&lt;br /&gt;&lt;br /&gt;                    // Add directions to repeat combo boxes&lt;br /&gt;                    String repeatDirection = Localization.GetString("RepeatDirectionHoriz", this.LocalResourceFile);&lt;br /&gt;                    lstNPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));&lt;br /&gt;                    lstFPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));&lt;br /&gt;                    lstMSLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));&lt;br /&gt;                    lstPPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));&lt;br /&gt;                    lstCPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "H"));&lt;br /&gt;&lt;br /&gt;                    repeatDirection = Localization.GetString("RepeatDirectionVert", this.LocalResourceFile);&lt;br /&gt;                    lstNPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));&lt;br /&gt;                    lstFPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));&lt;br /&gt;                    lstMSLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));&lt;br /&gt;                    lstPPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));&lt;br /&gt;                    lstCPLRepeatDirection.Items.Add(new ListItem(repeatDirection, "V"));&lt;br /&gt;&lt;br /&gt;                    // Add column names to sort order combo boxes&lt;br /&gt;                    String sortBy = "";&lt;br /&gt;                    sortBy = Localization.GetString("SortManufacturer", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortBy.Items.Add(new ListItem(sortBy, "0"));&lt;br /&gt;                    sortBy = Localization.GetString("SortModelNumber", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortBy.Items.Add(new ListItem(sortBy, "1"));&lt;br /&gt;                    sortBy = Localization.GetString("SortModelName", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortBy.Items.Add(new ListItem(sortBy, "2"));&lt;br /&gt;                    sortBy = Localization.GetString("SortUnitPrice", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortBy.Items.Add(new ListItem(sortBy, "3"));&lt;br /&gt;                    String sortDir = "";&lt;br /&gt;                    sortDir = Localization.GetString("SortAscending", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortDir.Items.Add(new ListItem(sortDir, "ASC"));&lt;br /&gt;                    sortDir = Localization.GetString("SortDescending", this.LocalResourceFile);&lt;br /&gt;                    lstCPLSortDir.Items.Add(new ListItem(sortDir, "DESC"));&lt;br /&gt;&lt;br /&gt;     // General Player Settings&lt;br /&gt;                    chkEnableContentIndexing.Checked = bool.Parse(moduleSettings.General.EnableContentIndexing);&lt;br /&gt;     chkUseDefaultCategory.Checked = bool.Parse(moduleSettings.General.UseDefaultCategory);&lt;br /&gt;     chkShowMessage.Checked = bool.Parse(moduleSettings.General.ShowMessage);&lt;br /&gt;                    chkShowNew.Checked = bool.Parse(moduleSettings.General.ShowNewProducts);&lt;br /&gt;     chkShowFeatured.Checked = bool.Parse(moduleSettings.General.ShowFeaturedProducts);&lt;br /&gt;&lt;br /&gt;                    chkShowMYSEARCH.Checked = bool.Parse(moduleSettings.General.ShowMYSEARCHProducts);&lt;br /&gt;&lt;br /&gt;     chkShowPopular.Checked = bool.Parse(moduleSettings.General.ShowPopularProducts);&lt;br /&gt;     chkShowCategory.Checked = bool.Parse(moduleSettings.General.ShowCategoryProducts);&lt;br /&gt;     chkShowDetail.Checked = bool.Parse(moduleSettings.General.ShowProductDetail);&lt;br /&gt;     lstDefaultCategory.SelectedValue = moduleSettings.General.DefaultCategoryID;&lt;br /&gt;                    ListItem itemTemplate = lstTemplate.Items.FindByText(moduleSettings.General.Template);&lt;br /&gt;                    if (itemTemplate != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemTemplate.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;&lt;br /&gt;                    // New list settings&lt;br /&gt;                    ListItem itemNPLContainerTemplate = lstNPLContainerTemplate.Items.FindByText(moduleSettings.NewProducts.ContainerTemplate);&lt;br /&gt;                    if (itemNPLContainerTemplate != null)&lt;br /&gt;     {&lt;br /&gt;                        itemNPLContainerTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;                    ListItem itemNPLTemplate = lstNPLTemplate.Items.FindByText(moduleSettings.NewProducts.Template);&lt;br /&gt;                    if (itemNPLTemplate != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemNPLTemplate.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;                    txtNPLRowCount.Text = moduleSettings.NewProducts.RowCount;&lt;br /&gt;                    txtNPLColumnCount.Text = moduleSettings.NewProducts.ColumnCount;&lt;br /&gt;                    txtNPLColumnWidth.Text = moduleSettings.NewProducts.ColumnWidth;&lt;br /&gt;                    ListItem itemNPLDirection = lstNPLRepeatDirection.Items.FindByValue(moduleSettings.NewProducts.RepeatDirection);&lt;br /&gt;                    if (itemNPLDirection != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemNPLDirection.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;                    txtNPLThumbnailWidth.Text = moduleSettings.NewProducts.ThumbnailWidth;&lt;br /&gt;                    chkNPLShowThumbnail.Checked = bool.Parse(moduleSettings.NewProducts.ShowThumbnail);&lt;br /&gt;                    lstNPLDetailPage.SelectedValue = moduleSettings.NewProducts.DetailPage;&lt;br /&gt;&lt;br /&gt;     // Featured list settings&lt;br /&gt;                    ListItem itemFPLContainerTemplate = lstFPLContainerTemplate.Items.FindByText(moduleSettings.FeaturedProducts.ContainerTemplate);&lt;br /&gt;                    if (itemFPLContainerTemplate != null)&lt;br /&gt;     {&lt;br /&gt;                        itemFPLContainerTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     ListItem itemFPLTemplate = lstFPLTemplate.Items.FindByText(moduleSettings.FeaturedProducts.Template);&lt;br /&gt;     if (itemFPLTemplate != null)&lt;br /&gt;     {&lt;br /&gt;      itemFPLTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     txtFPLRowCount.Text = moduleSettings.FeaturedProducts.RowCount;&lt;br /&gt;     txtFPLColumnCount.Text = moduleSettings.FeaturedProducts.ColumnCount;&lt;br /&gt;     txtFPLColumnWidth.Text = moduleSettings.FeaturedProducts.ColumnWidth;&lt;br /&gt;                    ListItem itemFPLDirection = lstFPLRepeatDirection.Items.FindByValue(moduleSettings.FeaturedProducts.RepeatDirection);&lt;br /&gt;                    if (itemFPLDirection != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemFPLDirection.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;     txtFPLThumbnailWidth.Text = moduleSettings.FeaturedProducts.ThumbnailWidth;&lt;br /&gt;     chkFPLShowThumbnail.Checked = bool.Parse(moduleSettings.FeaturedProducts.ShowThumbnail);&lt;br /&gt;     lstFPLDetailPage.SelectedValue = moduleSettings.FeaturedProducts.DetailPage;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                    // MYSEARCH list settings&lt;br /&gt;                    ListItem itemMSLContainerTemplate = lstMSLContainerTemplate.Items.FindByText(moduleSettings.MYSEARCHProducts.ContainerTemplate);&lt;br /&gt;                    if (itemMSLContainerTemplate != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemMSLContainerTemplate.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;                    ListItem itemMSLTemplate = lstMSLTemplate.Items.FindByText(moduleSettings.MYSEARCHProducts.Template);&lt;br /&gt;                    if (itemMSLTemplate != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemMSLTemplate.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;                    txtMSLRowCount.Text = moduleSettings.MYSEARCHProducts.RowCount;&lt;br /&gt;                    txtMSLColumnCount.Text = moduleSettings.MYSEARCHProducts.ColumnCount;&lt;br /&gt;                    txtMSLColumnWidth.Text = moduleSettings.MYSEARCHProducts.ColumnWidth;&lt;br /&gt;                    ListItem itemMSLDirection = lstMSLRepeatDirection.Items.FindByValue(moduleSettings.MYSEARCHProducts.RepeatDirection);&lt;br /&gt;                    if (itemMSLDirection != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemMSLDirection.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;                    txtMSLThumbnailWidth.Text = moduleSettings.MYSEARCHProducts.ThumbnailWidth;&lt;br /&gt;                    chkMSLShowThumbnail.Checked = bool.Parse(moduleSettings.MYSEARCHProducts.ShowThumbnail);&lt;br /&gt;                    lstMSLDetailPage.SelectedValue = moduleSettings.MYSEARCHProducts.DetailPage;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;     // Popular list settings&lt;br /&gt;                    ListItem itemPPLContainerTemplate = lstPPLContainerTemplate.Items.FindByText(moduleSettings.PopularProducts.ContainerTemplate);&lt;br /&gt;                    if (itemPPLContainerTemplate != null)&lt;br /&gt;     {&lt;br /&gt;                        itemPPLContainerTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     ListItem itemPPLTemplate = lstPPLTemplate.Items.FindByText(moduleSettings.PopularProducts.Template);&lt;br /&gt;     if (itemPPLTemplate != null)&lt;br /&gt;     {&lt;br /&gt;      itemPPLTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     txtPPLRowCount.Text = moduleSettings.PopularProducts.RowCount;&lt;br /&gt;     txtPPLColumnCount.Text = moduleSettings.PopularProducts.ColumnCount;&lt;br /&gt;     txtPPLColumnWidth.Text = moduleSettings.PopularProducts.ColumnWidth;&lt;br /&gt;                    ListItem itemPPLDirection = lstPPLRepeatDirection.Items.FindByValue(moduleSettings.PopularProducts.RepeatDirection);&lt;br /&gt;                    if (itemPPLDirection != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemPPLDirection.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;     txtPPLThumbnailWidth.Text = moduleSettings.PopularProducts.ThumbnailWidth;&lt;br /&gt;     chkPPLShowThumbnail.Checked = bool.Parse(moduleSettings.PopularProducts.ShowThumbnail);&lt;br /&gt;     lstPPLDetailPage.SelectedValue = moduleSettings.PopularProducts.DetailPage;&lt;br /&gt;&lt;br /&gt;     // Category list settings&lt;br /&gt;     ListItem itemCPLContainerTemplate = lstCPLContainerTemplate.Items.FindByText(moduleSettings.CategoryProducts.ContainerTemplate);&lt;br /&gt;                    if (itemCPLContainerTemplate != null)&lt;br /&gt;     {&lt;br /&gt;                        itemCPLContainerTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     ListItem itemCPLTemplate = lstCPLTemplate.Items.FindByText(moduleSettings.CategoryProducts.Template);&lt;br /&gt;     if (itemCPLTemplate != null)&lt;br /&gt;     {&lt;br /&gt;      itemCPLTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     txtCPLRowCount.Text = moduleSettings.CategoryProducts.RowCount;&lt;br /&gt;     txtCPLColumnCount.Text = moduleSettings.CategoryProducts.ColumnCount;&lt;br /&gt;     txtCPLColumnWidth.Text = moduleSettings.CategoryProducts.ColumnWidth;&lt;br /&gt;                    ListItem itemCPLDirection = lstCPLRepeatDirection.Items.FindByValue(moduleSettings.CategoryProducts.RepeatDirection);&lt;br /&gt;                    if (itemCPLDirection != null)&lt;br /&gt;                    {&lt;br /&gt;                        itemCPLDirection.Selected = true;&lt;br /&gt;                    }&lt;br /&gt;     txtCPLThumbnailWidth.Text = moduleSettings.CategoryProducts.ThumbnailWidth;&lt;br /&gt;     chkCPLShowThumbnail.Checked = bool.Parse(moduleSettings.CategoryProducts.ShowThumbnail);&lt;br /&gt;     lstCPLDetailPage.SelectedValue = moduleSettings.CategoryProducts.DetailPage;&lt;br /&gt;                    lstCPLSortBy.SelectedValue = moduleSettings.CategoryProducts.SortBy;&lt;br /&gt;                    lstCPLSortDir.SelectedValue = moduleSettings.CategoryProducts.SortDir;&lt;br /&gt;                    chkCPLSubCategories.Checked = bool.Parse(moduleSettings.CategoryProducts.SubCategories);&lt;br /&gt;&lt;br /&gt;     // Detail settings&lt;br /&gt;     ListItem itemDetailTemplate = lstDetailTemplate.Items.FindByText(moduleSettings.ProductDetail.Template);&lt;br /&gt;     if (itemDetailTemplate != null)&lt;br /&gt;     {&lt;br /&gt;      itemDetailTemplate.Selected = true;&lt;br /&gt;     }&lt;br /&gt;     chkDetailShowThumbnail.Checked = bool.Parse(moduleSettings.ProductDetail.ShowThumbnail);&lt;br /&gt;     txtDetailThumbnailWidth.Text = moduleSettings.ProductDetail.ThumbnailWidth;&lt;br /&gt;     chkDetailShowReviews.Checked = bool.Parse(moduleSettings.ProductDetail.ShowReviews);&lt;br /&gt;                    lstPDSReturnPage.SelectedValue = moduleSettings.ProductDetail.ReturnPage;&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;   catch(Exception ex)&lt;br /&gt;   {&lt;br /&gt;    Exceptions.ProcessModuleLoadException(this, ex);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public override void UpdateSettings()&lt;br /&gt;  {&lt;br /&gt;   try&lt;br /&gt;   {&lt;br /&gt;    PortalSecurity security = new PortalSecurity();&lt;br /&gt;&lt;br /&gt;    // General Settings&lt;br /&gt;                moduleSettings.General.EnableContentIndexing = chkEnableContentIndexing.Checked.ToString();&lt;br /&gt;    moduleSettings.General.Template = lstTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.General.UseDefaultCategory = chkUseDefaultCategory.Checked.ToString();&lt;br /&gt;    moduleSettings.General.ShowMessage = chkShowMessage.Checked.ToString();&lt;br /&gt;                moduleSettings.General.ShowNewProducts = chkShowNew.Checked.ToString();&lt;br /&gt;                moduleSettings.General.ShowFeaturedProducts = chkShowFeatured.Checked.ToString();&lt;br /&gt;    moduleSettings.General.ShowPopularProducts = chkShowPopular.Checked.ToString();&lt;br /&gt;    moduleSettings.General.ShowCategoryProducts = chkShowCategory.Checked.ToString();&lt;br /&gt;    moduleSettings.General.ShowProductDetail = chkShowDetail.Checked.ToString();&lt;br /&gt;                moduleSettings.General.Template = lstTemplate.SelectedItem.Text;&lt;br /&gt;&lt;br /&gt;    if (chkUseDefaultCategory.Checked)&lt;br /&gt;    {&lt;br /&gt;     moduleSettings.General.DefaultCategoryID = lstDefaultCategory.SelectedItem.Value;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;                // New list settings&lt;br /&gt;                moduleSettings.NewProducts.ContainerTemplate = lstNPLContainerTemplate.SelectedItem.Text;&lt;br /&gt;                moduleSettings.NewProducts.Template = lstNPLTemplate.SelectedItem.Text;&lt;br /&gt;                moduleSettings.NewProducts.RowCount = security.InputFilter(txtNPLRowCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.NewProducts.ColumnCount = security.InputFilter(txtNPLColumnCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.NewProducts.ColumnWidth = security.InputFilter(txtNPLColumnWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.NewProducts.RepeatDirection = lstNPLRepeatDirection.SelectedItem.Value;&lt;br /&gt;                moduleSettings.NewProducts.ThumbnailWidth = security.InputFilter(txtNPLThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.NewProducts.ShowThumbnail = chkNPLShowThumbnail.Checked.ToString();&lt;br /&gt;                moduleSettings.NewProducts.DetailPage = lstNPLDetailPage.SelectedItem.Value;&lt;br /&gt;&lt;br /&gt;    // Featured list settings&lt;br /&gt;                moduleSettings.FeaturedProducts.ContainerTemplate = lstFPLContainerTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.FeaturedProducts.Template = lstFPLTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.FeaturedProducts.RowCount = security.InputFilter(txtFPLRowCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.FeaturedProducts.ColumnCount = security.InputFilter(txtFPLColumnCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.FeaturedProducts.ColumnWidth = security.InputFilter(txtFPLColumnWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;                moduleSettings.FeaturedProducts.RepeatDirection = lstFPLRepeatDirection.SelectedItem.Value;&lt;br /&gt;    moduleSettings.FeaturedProducts.ThumbnailWidth = security.InputFilter(txtFPLThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.FeaturedProducts.ShowThumbnail = chkFPLShowThumbnail.Checked.ToString();&lt;br /&gt;    moduleSettings.FeaturedProducts.DetailPage = lstFPLDetailPage.SelectedItem.Value;&lt;br /&gt;&lt;br /&gt;                // MYSEARCH list settings&lt;br /&gt;                moduleSettings.MYSEARCHProducts.ContainerTemplate = lstMSLContainerTemplate.SelectedItem.Text;&lt;br /&gt;                moduleSettings.MYSEARCHProducts.Template = lstMSLTemplate.SelectedItem.Text;&lt;br /&gt;                moduleSettings.MYSEARCHProducts.RowCount = security.InputFilter(txtMSLRowCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.MYSEARCHProducts.ColumnCount = security.InputFilter(txtMSLColumnCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.MYSEARCHProducts.ColumnWidth = security.InputFilter(txtMSLColumnWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.MYSEARCHProducts.RepeatDirection = lstMSLRepeatDirection.SelectedItem.Value;&lt;br /&gt;                moduleSettings.MYSEARCHProducts.ThumbnailWidth = security.InputFilter(txtMSLThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting);&lt;br /&gt;                moduleSettings.MYSEARCHProducts.ShowThumbnail = chkMSLShowThumbnail.Checked.ToString();&lt;br /&gt;                moduleSettings.MYSEARCHProducts.DetailPage = lstMSLDetailPage.SelectedItem.Value;&lt;br /&gt;&lt;br /&gt;    // Popular list settings&lt;br /&gt;                moduleSettings.PopularProducts.ContainerTemplate = lstPPLContainerTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.PopularProducts.Template = lstPPLTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.PopularProducts.RowCount = security.InputFilter(txtPPLRowCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.PopularProducts.ColumnCount = security.InputFilter(txtPPLColumnCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.PopularProducts.ColumnWidth = security.InputFilter(txtPPLColumnWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;                moduleSettings.PopularProducts.RepeatDirection = lstPPLRepeatDirection.SelectedItem.Value;&lt;br /&gt;    moduleSettings.PopularProducts.ThumbnailWidth = security.InputFilter(txtPPLThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.PopularProducts.ShowThumbnail = chkPPLShowThumbnail.Checked.ToString();&lt;br /&gt;    moduleSettings.PopularProducts.DetailPage = lstPPLDetailPage.SelectedItem.Value;&lt;br /&gt;&lt;br /&gt;    // Category list settings&lt;br /&gt;                moduleSettings.CategoryProducts.ContainerTemplate = lstCPLContainerTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.CategoryProducts.Template = lstCPLTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.CategoryProducts.RowCount = security.InputFilter(txtCPLRowCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.CategoryProducts.ColumnCount = security.InputFilter(txtCPLColumnCount.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.CategoryProducts.ColumnWidth = security.InputFilter(txtCPLColumnWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;                moduleSettings.CategoryProducts.RepeatDirection = lstCPLRepeatDirection.SelectedItem.Value;&lt;br /&gt;    moduleSettings.CategoryProducts.ThumbnailWidth = security.InputFilter(txtCPLThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;    moduleSettings.CategoryProducts.ShowThumbnail = chkCPLShowThumbnail.Checked.ToString();&lt;br /&gt;    moduleSettings.CategoryProducts.DetailPage = lstCPLDetailPage.SelectedItem.Value;&lt;br /&gt;                moduleSettings.CategoryProducts.SortBy = lstCPLSortBy.SelectedItem.Value;&lt;br /&gt;                moduleSettings.CategoryProducts.SortDir = lstCPLSortDir.SelectedItem.Value;&lt;br /&gt;                moduleSettings.CategoryProducts.SubCategories = chkCPLSubCategories.Checked.ToString();&lt;br /&gt;&lt;br /&gt;    // Detail settings&lt;br /&gt;    moduleSettings.ProductDetail.Template = lstDetailTemplate.SelectedItem.Text;&lt;br /&gt;    moduleSettings.ProductDetail.ShowThumbnail = chkDetailShowThumbnail.Checked.ToString();&lt;br /&gt;    moduleSettings.ProductDetail.ThumbnailWidth = security.InputFilter(txtDetailThumbnailWidth.Text, PortalSecurity.FilterFlag.NoMarkup | PortalSecurity.FilterFlag.NoScripting );&lt;br /&gt;                moduleSettings.ProductDetail.ShowReviews = chkDetailShowReviews.Checked.ToString();&lt;br /&gt;                moduleSettings.ProductDetail.ReturnPage = lstPDSReturnPage.SelectedItem.Value;&lt;br /&gt;   }&lt;br /&gt;   catch(Exception ex)&lt;br /&gt;   {&lt;br /&gt;    Exceptions.ProcessModuleLoadException(this, ex);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  #endregion&lt;br /&gt;&lt;br /&gt;  #region Private Functions&lt;br /&gt;  private void loadTemplates()&lt;br /&gt;  {&lt;br /&gt;            ArrayList templates = TemplateController.GetTemplates(templatesPath);&lt;br /&gt;&lt;br /&gt;   foreach (TemplateInfo templateInfo in templates)&lt;br /&gt;   {&lt;br /&gt;    lstTemplate.Items.Add(new ListItem(templateInfo.Name,  templateInfo.Path));&lt;br /&gt;                lstNPLContainerTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path));&lt;br /&gt;                lstNPLTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path));&lt;br /&gt;                lstFPLContainerTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path));&lt;br /&gt;    lstFPLTemplate.Items.Add(new ListItem(templateInfo.Name,  templateInfo.Path));&lt;br /&gt;&lt;br /&gt;                lstMSLContainerTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path)); //Prasad&lt;br /&gt;                lstMSLTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path)); //Prasad&lt;br /&gt;&lt;br /&gt;                lstPPLContainerTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path));&lt;br /&gt;    lstPPLTemplate.Items.Add(new ListItem(templateInfo.Name,  templateInfo.Path));&lt;br /&gt;                lstCPLContainerTemplate.Items.Add(new ListItem(templateInfo.Name, templateInfo.Path));&lt;br /&gt;    lstCPLTemplate.Items.Add(new ListItem(templateInfo.Name,  templateInfo.Path));&lt;br /&gt;    lstDetailTemplate.Items.Add(new ListItem(templateInfo.Name,  templateInfo.Path));&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  #endregion&lt;br /&gt; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-4.html" style="font-size:18px"&gt;Continue - Part 4 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-3335602330360581009?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/3335602330360581009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3335602330360581009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3335602330360581009'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-3.html' title='dotnetnuke store product search module - part 3'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-6971060013456750688</id><published>2010-01-20T14:12:00.015+05:30</published><updated>2010-01-20T15:21:57.414+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce'/><title type='text'>dotnetnuke store product search module - part 4</title><content type='html'>DesktopModules\Store\Catalog\Providers\DataProviders\SqlDataProvider\SqlDataProvider.cs&lt;br /&gt;Add these methods&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;public override IDataReader GetPortalMYSEARCHProducts(int PortalID, bool Archived, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            return SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_Products_GetPortalMYSEARCHProducts", PortalID, Archived,SearchText,SearchField);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;public override IDataReader GetMYSEARCHProducts(int CategoryID, bool Archived, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            return SqlHelper.ExecuteReader(ConnectionString, DatabaseOwner + ObjectQualifier + "Store_Products_GetMYSEARCHProducts", CategoryID, Archived,SearchText,SearchField);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;DesktopModules\Store\Catalog\ModuleSettings.cs&lt;br /&gt;&lt;br /&gt;Change Public methods Like this.&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;public class ModuleSettings&lt;br /&gt; {&lt;br /&gt;  public GeneralSettings General;&lt;br /&gt;        public NewProductsSettings NewProducts;&lt;br /&gt;        public FeaturedProductsSettings FeaturedProducts;&lt;br /&gt;        public MYSEARCHProductsSettings MYSEARCHProducts; &lt;br /&gt;  public PopularProductsSettings PopularProducts;&lt;br /&gt;  public CategoryProductsSettings CategoryProducts;&lt;br /&gt;  public ProductDetailSettings ProductDetail;&lt;br /&gt;  public CategoryMenuSettings CategoryMenu;&lt;br /&gt;&lt;br /&gt;  public ModuleSettings(int moduleId, int tabId)&lt;br /&gt;  {&lt;br /&gt;   General = new GeneralSettings(moduleId, tabId);&lt;br /&gt;            NewProducts = new NewProductsSettings(moduleId, tabId);&lt;br /&gt;            FeaturedProducts = new FeaturedProductsSettings(moduleId, tabId);&lt;br /&gt;            MYSEARCHProducts = new MYSEARCHProductsSettings(moduleId, tabId);&lt;br /&gt;   PopularProducts = new PopularProductsSettings(moduleId, tabId);&lt;br /&gt;   CategoryProducts = new CategoryProductsSettings(moduleId, tabId);&lt;br /&gt;   ProductDetail = new ProductDetailSettings(moduleId, tabId);&lt;br /&gt;   CategoryMenu = new CategoryMenuSettings(moduleId, tabId);&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Add this Region with other settings. (ModuleSettings.cs)&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;#region MYSEARCH Product Settings&lt;br /&gt;    public class MYSEARCHProductsSettings : SettingsWrapper&lt;br /&gt;    {&lt;br /&gt;        [ModuleSetting("mslcontainertemplate", "ListContainer.htm")]&lt;br /&gt;        public string ContainerTemplate&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("msltemplate", "MYSEARCHProduct.htm")]&lt;br /&gt;        public string Template&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslrowcount", "10")]&lt;br /&gt;        public string RowCount&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslcolumncount", "2")]&lt;br /&gt;        public string ColumnCount&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslcolumnwidth", "200")]&lt;br /&gt;        public string ColumnWidth&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslrepeatdirection", "H")]&lt;br /&gt;        public string RepeatDirection&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslshowthumbnail", "true")]&lt;br /&gt;        public string ShowThumbnail&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("mslthumbnailwidth", "90")]&lt;br /&gt;        public string ThumbnailWidth&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        [ModuleSetting("msldetailtabid", "0")]&lt;br /&gt;        public string DetailPage&lt;br /&gt;        {&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            get&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                return getSetting(m);&lt;br /&gt;            }&lt;br /&gt;            [MethodImpl(MethodImplOptions.NoInlining)]&lt;br /&gt;            set&lt;br /&gt;            {&lt;br /&gt;                MethodBase m = MethodBase.GetCurrentMethod();&lt;br /&gt;                setSetting(m, value);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        public MYSEARCHProductsSettings(int moduleId, int tabId): base(moduleId, tabId)&lt;br /&gt;        {&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;    #endregion&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;ProductController.cs&lt;br /&gt;Add these methods&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;public ArrayList GetPortalMYSEARCHProducts(int portalID, bool archived, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            return CBO.FillCollection(DataProvider.Instance().GetPortalMYSEARCHProducts(portalID, archived,SearchText,SearchField), typeof(ProductInfo));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;public ArrayList GetMYSEARCHProducts(int categoryID, bool archived, string SearchText, string SearchField)&lt;br /&gt;        {&lt;br /&gt;            return CBO.FillCollection(DataProvider.Instance().GetMYSEARCHProducts(categoryID, archived,SearchText,SearchField), typeof(ProductInfo));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;a href="http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-5.html" style="font-size:18px"&gt;Continue - Part 5 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-6971060013456750688?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/6971060013456750688/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-4.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6971060013456750688'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6971060013456750688'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-4.html' title='dotnetnuke store product search module - part 4'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-6116159283740153799</id><published>2010-01-20T14:11:00.003+05:30</published><updated>2010-01-20T15:21:46.228+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='ecommerce'/><title type='text'>dotnetnuke store product search module - part 5</title><content type='html'>There are very basic stored procedures for the search module.&lt;br /&gt;Database Stored Procedures&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;CREATE PROCEDURE [dbo].[zee_Store_Products_GetMYSEARCHProducts]&lt;br /&gt;  @CategoryID int,&lt;br /&gt;  @Archived bit = 0,&lt;br /&gt;&lt;br /&gt;  @SearchText varchar(500),&lt;br /&gt;  @SearchField varchar(200)&lt;br /&gt; &lt;br /&gt; AS&lt;br /&gt; SET NOCOUNT ON&lt;br /&gt; &lt;br /&gt;IF @SearchField = 'Manufacturer'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  BEGIN&lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;--   ,CASE&lt;br /&gt;--    WHEN  @SearchField='Manufacturer' THEN Manufacturer -- PM @SearchField&lt;br /&gt;--    WHEN  @SearchField='ModelNumber'  THEN ModelNumber&lt;br /&gt;--       WHEN  @SearchField='ModelName'  THEN ModelName&lt;br /&gt;--   END&lt;br /&gt;&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND Archived = 1&lt;br /&gt;   AND Manufacturer  like '%' + @SearchText + '%'&lt;br /&gt;   &lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END&lt;br /&gt; ELSE&lt;br /&gt;  BEGIN&lt;br /&gt;   &lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;--   ,CASE&lt;br /&gt;--    WHEN  @SearchField='Manufacturer' THEN Manufacturer -- PM @SearchField&lt;br /&gt;--    WHEN  @SearchField='ModelNumber'  THEN ModelNumber&lt;br /&gt;--       WHEN  @SearchField='ModelName'  THEN ModelName&lt;br /&gt;--   END&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   &lt;br /&gt;   AND  Archived = 0&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND Manufacturer  like '%' + @SearchText + '%' --@SearchField PM &lt;br /&gt;&lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IF @SearchField = 'ModelNumber'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  BEGIN&lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND Archived = 1&lt;br /&gt;   AND ModelNumber  like '%' + @SearchText + '%'&lt;br /&gt;   &lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END&lt;br /&gt; ELSE&lt;br /&gt;  BEGIN&lt;br /&gt;   &lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   &lt;br /&gt;   AND  Archived = 0&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND ModelNumber  like '%' + @SearchText + '%' --@SearchField PM &lt;br /&gt;&lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END&lt;br /&gt;&lt;br /&gt;IF @SearchField = 'ModelName'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  BEGIN&lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND Archived = 1&lt;br /&gt;   AND ModelName  like '%' + @SearchText + '%'&lt;br /&gt;   &lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END&lt;br /&gt; ELSE&lt;br /&gt;  BEGIN&lt;br /&gt;   &lt;br /&gt;   SELECT&lt;br /&gt;    ProductID,&lt;br /&gt;    PortalID,&lt;br /&gt;    CategoryID,&lt;br /&gt;    Manufacturer,&lt;br /&gt;    ModelNumber,&lt;br /&gt;    ModelName,&lt;br /&gt;    ProductImage,&lt;br /&gt;    UnitCost,&lt;br /&gt;    Keywords,&lt;br /&gt;    Summary,&lt;br /&gt;    [Description],&lt;br /&gt;    Featured,&lt;br /&gt;    Archived,&lt;br /&gt;    CreatedByUser,&lt;br /&gt;    CreatedDate,&lt;br /&gt;    ProductWeight,&lt;br /&gt;    ProductHeight,&lt;br /&gt;    ProductLength,&lt;br /&gt;    ProductWidth,&lt;br /&gt;    SaleStartDate,&lt;br /&gt;    SaleEndDate,&lt;br /&gt;    SalePrice,&lt;br /&gt;    StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;   FROM  dbo.zee_Store_Products &lt;br /&gt;   WHERE  dbo.zee_Store_Products.CategoryID  = @CategoryID&lt;br /&gt;   &lt;br /&gt;   AND  Archived = 0&lt;br /&gt;   AND IsDeleted = 0&lt;br /&gt;   AND ModelName  like '%' + @SearchText + '%' --@SearchField PM &lt;br /&gt;&lt;br /&gt;   ORDER BY NEWID()&lt;br /&gt;  END &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE PROCEDURE [dbo].[zee_Store_Products_GetPortalMYSEARCHProducts]&lt;br /&gt;  @PortalID int,&lt;br /&gt;  @Archived bit = 0,&lt;br /&gt;&lt;br /&gt;  @SearchText varchar(500),&lt;br /&gt;  @SearchField varchar(200)&lt;br /&gt;&lt;br /&gt; AS&lt;br /&gt; SET NOCOUNT ON&lt;br /&gt; &lt;br /&gt;IF @SearchField = 'Manufacturer'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;--   ,CASE&lt;br /&gt;--    WHEN  @SearchField='Manufacturer' THEN Manufacturer -- PM @SearchField&lt;br /&gt;--    WHEN  @SearchField='ModelNumber'  THEN ModelNumber&lt;br /&gt;--       WHEN  @SearchField='ModelName'  THEN ModelName&lt;br /&gt;--    --WHEN  @SearchField='SalePrice'  THEN SalePrice&lt;br /&gt;--   END&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  --AND Featured = 1&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  --AND  Manufacturer like 'mm%' -- PM Manufacturer&lt;br /&gt;  AND Manufacturer like '%' + @SearchText + '%'&lt;br /&gt;&lt;br /&gt;  ORDER BY NEWID()&lt;br /&gt; ELSE&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;--   ,CASE&lt;br /&gt;--    WHEN  @SearchField='Manufacturer' THEN Manufacturer -- PM @SearchField&lt;br /&gt;--    WHEN  @SearchField='ModelNumber'  THEN ModelNumber&lt;br /&gt;--       WHEN  @SearchField='ModelName'  THEN ModelName&lt;br /&gt;--    --WHEN  @SearchField='SalePrice'  THEN SalePrice&lt;br /&gt;--   END&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  --AND Featured = 1&lt;br /&gt;  AND  Archived = 0&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  AND Manufacturer like '%' + @SearchText + '%' -- PM Manufacturer&lt;br /&gt;  --AND Manufacturer  like 'mm%' -- PM @SearchField&lt;br /&gt;  ORDER BY NEWID()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IF @SearchField = 'ModelNumber'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  --AND  Manufacturer like 'mm%' -- PM Manufacturer&lt;br /&gt;  AND ModelNumber like '%' + @SearchText + '%'&lt;br /&gt;&lt;br /&gt;  ORDER BY NEWID()&lt;br /&gt; ELSE&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  AND  Archived = 0&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  AND ModelNumber like '%' + @SearchText + '%' -- PM Manufacturer&lt;br /&gt;  --AND Manufacturer  like 'mm%' -- PM @SearchField&lt;br /&gt;  ORDER BY NEWID()&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;IF @SearchField = 'ModelName'&lt;br /&gt; IF @Archived = 1&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  --AND  Manufacturer like 'mm%' -- PM Manufacturer&lt;br /&gt;  AND ModelName like '%' + @SearchText + '%'&lt;br /&gt;&lt;br /&gt;  ORDER BY NEWID()&lt;br /&gt; ELSE&lt;br /&gt;  SELECT&lt;br /&gt;   ProductID,&lt;br /&gt;   PortalID,&lt;br /&gt;   CategoryID,&lt;br /&gt;   Manufacturer,&lt;br /&gt;   ModelNumber,&lt;br /&gt;   ModelName,&lt;br /&gt;   ProductImage,&lt;br /&gt;   UnitCost,&lt;br /&gt;   Keywords,&lt;br /&gt;   Summary,&lt;br /&gt;   [Description],&lt;br /&gt;   Featured,&lt;br /&gt;   Archived,&lt;br /&gt;   CreatedByUser,&lt;br /&gt;   CreatedDate,&lt;br /&gt;   ProductWeight,&lt;br /&gt;   ProductHeight,&lt;br /&gt;   ProductLength,&lt;br /&gt;   ProductWidth,&lt;br /&gt;   SaleStartDate,&lt;br /&gt;   SaleEndDate,&lt;br /&gt;   SalePrice,&lt;br /&gt;   StockQuantity,&lt;br /&gt;    karatage&lt;br /&gt;&lt;br /&gt;  FROM  dbo.zee_Store_Products &lt;br /&gt;  WHERE  PortalID = @PortalID&lt;br /&gt;  AND  Archived = 0&lt;br /&gt;  AND IsDeleted = 0&lt;br /&gt;  AND ModelName like '%' + @SearchText + '%' -- PM Manufacturer&lt;br /&gt;  --AND Manufacturer  like 'mm%' -- PM @SearchField&lt;br /&gt;  ORDER BY NEWID()  &lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now in the html templates you can use it [MYSEARCH] for search input and [MYSEARCHRESULT] to display searched result.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-1.html" style="font-size:18px"&gt;Return to - Part 1 &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-6116159283740153799?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/6116159283740153799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6116159283740153799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6116159283740153799'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/store-module-search-module-part-5.html' title='dotnetnuke store product search module - part 5'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-3293668986139202114</id><published>2010-01-16T14:37:00.001+05:30</published><updated>2010-01-16T14:44:10.350+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><category scheme='http://www.blogger.com/atom/ns#' term='Single Sign On'/><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net Solutions'/><title type='text'>SAML Single Sign On for Google Apps in .NET and DotNetNuke</title><content type='html'>Nowadays there are very popular applications like Face book Applications, Google Apps, Blogs, and Forms etc. The purpose of all this applications is collecting people to one place. But you may need to go for each and every web site or application and login to these applications separately. Most probably you may think how nice it is login to the all applications in one place under a secured environment. Yes. Now it is possible. Think there is a one web application to login and you can access all you applications from one place. You are not redirecting to any other applications. But still you are in the same web site. This is what we called SSO. SSO stands for Single Sign On. Google apps are also giving this feature. You can use some of their projects for this. But I saw there are a very few resources and references for this on the web. Now I have given some useful tips to run the .NET Google Apps web project which I got with my SSO experience.&lt;br /&gt;Give your virtual directory an Application Name that does not have dots (.) in the name. To make sure you are not having naming issues, give a short name such as SSO_Dir as your Virtual Directory name.&lt;br /&gt;&lt;br /&gt;If you are going to run your SSO application on the DNN application then you have to develop a special module. But I saw there are several issues while it running through the current DNN Framework. As a solution I propose this. Add your SSO project folder to the DNN root. If you are trying to run this application as a normal application on DNN you will see some errors. The solution is creating a sub domain for the main DNN domain and assigns the SSO root as the sub domain root path. Sometimes you may need hosing provider’s support for this. Now you can give the SSO prompt page as the Google signing page. &lt;br /&gt;&lt;br /&gt;If your SSO application is a sub project or running through a sub domain as a sub application you will use an additional web.config file SSO application. But it may be an issue when you are running 2 web.config files under one project. Especially it is an issue in the DNN framework. &lt;br /&gt;&lt;br /&gt;You will see this common error:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Then move the Subfolder web.config Contents to the Main folder web.config file and keep them as one project. But still you can run your sub domain as a different application. &lt;br /&gt;&lt;br /&gt;Still if you see above error then please check your backup folder. Normally your SSO application is coming as a VS 2005 project. But if you use VS 2008 you need to convert your project for 2008 version. In this process it is copying all files to this ‘Backup’ folder.&lt;br /&gt;&lt;br /&gt;If you do not like this solution and if you want to keep the sub web.config file as it is you can remove ‘Authentication’ properties and session states properties from it. It will work if you are not using major properties from the sub web.config file.&lt;br /&gt;&lt;br /&gt;When you are building your own SSO application for Google Apps you need to have a better idea about this process. You can have a better knowledge about the mechanism of Google SSO this is the place - http://code.google.com/apis/apps/sso/saml_reference_implementation.html&lt;br /&gt;&lt;br /&gt;If you are using Visual Studio 2005 these are the steps to generate certificates for the SSO Apps from our VS command prompt.&lt;br /&gt;&lt;br /&gt;Creating and installing a certificate&lt;br /&gt;&lt;br /&gt;Run these commands from a command prompt. If Visual Studio 2005 is installed in a different location, change the commands accordingly.&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;cd \projects\Google.Apps.SingleSignOn\key&lt;br /&gt;"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\makecert.exe" -r -pe -n "CN=My Domain" -sky exchange -sv mycert.pvk mycert.cer&lt;br /&gt;"C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin\pvk2pfx.exe" -pvk mycert.pvk -spc mycert.cer -pfx mycert.pfx&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;makecert.exe will generate two files:&lt;br /&gt;mycert.cer - certificate which contains the public key&lt;br /&gt;mycert.pvk - contains the private key&lt;br /&gt;pvk2pfx.exe will generate one file:&lt;br /&gt;mycert.pfx - contains the private key, usable by .NET framework&lt;br /&gt;That is what the procedure of Google team. It is not for 2008. If you are using Visual Studio 2008 this is the way to generate certificates.&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;makecert.exe -r -pe -n "CN=My Domain" -sky exchange -sv mycert.pvk mycert.cer&lt;br /&gt;pvk2pfx.exe -pvk mycert.pvk -spc mycert.cer -pfx mycert.pfx&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;You should change the certification name with the domain name and other details in the command as you want.&lt;br /&gt;Now you will see the difference and the reason why I propose this way. You cannot find a folder called ‘C:\Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin’ for VS 2008.&lt;br /&gt;You must upload the certificates to the appropriate folder of the server which you’ve generated in your machine and to the Google Apps.&lt;br /&gt;&lt;br /&gt;Also, please note SSO will not work if user is referred directly to&lt;br /&gt;http://mydomain.com/GoogleAppsSso/Prompt.aspx. This is because a redirection from a Google Property (Docs, Gmail, Calendar...) is required in order to get the proper SAML Request and the Relay State. This a common mistake when Administrators try to refer their users directly to the SSO Prompt page.&lt;br /&gt;For a success Google Apps Single Sign On application you need to pass SAMLRequest and RelayState. You can see this messages on text areas and when it is running successfully.You can hide it like this. Keep remember not to remove this text areas.&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;textarea cols="1" id="SAMLRequest" name="SAMLRequest" rows="1" runat="server" style="visibility: hidden;"&gt;&lt;/textarea&gt;&lt;br /&gt;  &lt;textarea cols="1" id="RelayState" name="RelayState" rows="1" runat="server" style="visibility: hidden;"&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Also you can use hidden fields instead of text areas.&lt;br /&gt;If you have any issues regarding the Google SSO, I like to support you. I hope to bring you more SSO tips for other applications as well in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-3293668986139202114?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/3293668986139202114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/saml-single-sign-on-for-google-apps-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3293668986139202114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/3293668986139202114'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/saml-single-sign-on-for-google-apps-in.html' title='SAML Single Sign On for Google Apps in .NET and DotNetNuke'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-1279523451153011860</id><published>2010-01-02T15:38:00.004+05:30</published><updated>2010-01-02T15:51:23.719+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dot Net Solutions'/><title type='text'>Image Thumbnail Generation</title><content type='html'>Here I am posting a code for generating a thumbnail for your given image. You can pass your width and height through this method via parameters. If you want to generate square thumbnails, you need only to pass same value for width and height. Then it will give you a cropped thumbnail.&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;public void ResizeImage(string OrigFile, string NewFile, int NewWidth, int MaxHeight, bool ResizeIfWider)&lt;br /&gt;{&lt;br /&gt;System.Drawing.Image FullSizeImage = System.Drawing.Image.FromFile(OrigFile);&lt;br /&gt;// Ensure the generated thumbnail is not being used by rotating it 360 degrees&lt;br /&gt;FullSizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);&lt;br /&gt;FullSizeImage.RotateFlip(System.Drawing.RotateFlipType.Rotate180FlipNone);&lt;br /&gt;if (ResizeIfWider)&lt;br /&gt;{&lt;br /&gt;if (FullSizeImage.Width &lt;= NewWidth)&lt;br /&gt;                {&lt;br /&gt;                    NewWidth = FullSizeImage.Width;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            int NewHeight = FullSizeImage.Height * NewWidth / FullSizeImage.Width;&lt;br /&gt;            if (NewHeight &gt; MaxHeight) // Height resize if necessary&lt;br /&gt;{&lt;br /&gt;NewWidth = FullSizeImage.Width * MaxHeight / FullSizeImage.Height;&lt;br /&gt;NewHeight = MaxHeight;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// Create the new image with the sizes we've calculated&lt;br /&gt;System.Drawing.Image NewImage = FullSizeImage.GetThumbnailImage(NewWidth, NewHeight, null, IntPtr.Zero);&lt;br /&gt;FullSizeImage.Dispose();&lt;br /&gt;NewImage.Save(NewFile);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-1279523451153011860?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/1279523451153011860/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/image-thumbnail-generation.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/1279523451153011860'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/1279523451153011860'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2010/01/image-thumbnail-generation.html' title='Image Thumbnail Generation'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-8000893234240900948</id><published>2009-11-06T19:12:00.004+05:30</published><updated>2009-11-10T20:31:22.366+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><title type='text'>DotNetNuke Installation Issues and Solutions</title><content type='html'>I have given below some tips to install DotNetNuke Installation in your system. I have seen most of developers are asking different questions with the installation failures. If you follow my instructions you can save lot of time without wasting your effort. I think the current stable version is 4.9.5. I am installing DotNetNuke successfully in XP and Vista by following this procedure.&lt;br /&gt;You should not run the application before doing these instructions. You can do it after doing following changes.&lt;br /&gt;Keep remember to change release.config to web.config. You should not keep a copy of the web.config file inside the root. If you want to keep it as a reference you can back up it in another location.&lt;br /&gt;You can change the following code manually in the web.config file .Sometimes this will save you in your manual process installation.&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;add name="SiteSqlServer" connectionString="Data Source=MyServer-A\SQLEXPRESS;Initial Catalog=databaseName;User ID=sa;Password=pw123" providerName="System.Data.SqlClient" /&gt;&lt;br /&gt;&lt;add name="TestingSiteSqlServer" connectionString="Data Source=MyServer-A\SQLEXPRESS;Initial Catalog=DBname;User ID=sa;Password=pw123" providerName="System.Data.SqlClient" /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Find where is the ScriptModule has added as a module.Remove all and add following lines in appropriate place.&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;!-- The system.webServer section is required for IIS7 compatability It is ignored by IIS6--&gt;&lt;br /&gt;&lt;modules&gt;&lt;br /&gt;&lt;remove name="ScriptModule" /&gt;&lt;br /&gt;&lt;add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" preCondition="managedHandler" /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If you are installing the source version it will say you have not installed the new Ajax version. If you have already installed Ajax in your machine then it might be an older version. Anyway for  your above both issues this is the solution.&lt;br /&gt;Download new Ajax toolkit from the Microsoft Ajax official site and  install it in your machine. If you followed the default procedure it will save the .dll in this path.&lt;br /&gt;C:\Program Files\Microsoft ASP.NET\ASP.NET 2.0 AJAX Extensions\v1.0.61025&lt;br /&gt;You can copy it and save in the following folder in the DotNetNuke Installation.&lt;br /&gt;In DotNetNuke.Library Project Controls Project create folder AJAX and sub folder bin Under Ajax folder&lt;br /&gt;This is only if you are using new Version. If you have done this perfectly it should work Ajax functions in your application.&lt;br /&gt;Anyway If you upgrade your Installation to new 3.5 Framework sometimes you may need to edit the following lines as follows.&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;runtime&gt;&lt;br /&gt;&lt;assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;&lt;br /&gt;&lt;probing privatePath="bin;bin\HttpModules;bin\Providers;bin\Modules;bin\Support;" /&gt;&lt;br /&gt;&lt;dependentassembly&gt;&lt;br /&gt;&lt;assemblyidentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/&gt;&lt;br /&gt;&lt;bindingredirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt;&lt;br /&gt;&lt;/dependentAssembly&gt;&lt;br /&gt;&lt;dependentassembly&gt;&lt;br /&gt;&lt;assemblyidentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/&gt;&lt;br /&gt;&lt;bindingredirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/&gt;&lt;br /&gt;&lt;/dependentAssembly&gt;&lt;br /&gt;&lt;/assemblyBinding&gt;&lt;br /&gt;&lt;/runtime&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Now build the site and run the application.&lt;br /&gt;If you have any doubt about above instructions feel free to ask. I am ready to send you a working solution with the Database to your inbox.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-8000893234240900948?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/8000893234240900948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/11/dotnetnuke-installation-issues-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/8000893234240900948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/8000893234240900948'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/11/dotnetnuke-installation-issues-and.html' title='DotNetNuke Installation Issues and Solutions'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-7800815307806108686</id><published>2009-09-14T16:33:00.004+05:30</published><updated>2009-09-14T16:41:10.227+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='DotNetNuke'/><title type='text'>DotNetNuke Password Reset</title><content type='html'>If you forget DNN password ,Then how you are going to recover.Think you can not remember both admin and host passwords.You can do nothing without admin &amp;amp; host password.&lt;br /&gt;Yes there is a password reminder option.But it seems not working properly.Anyway I am bringing you a good option today.Run following SQL in the Query analyzer and run the command what I have given at the end.&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;br /&gt;CREATE procedure [dbo].[uap_ResetPassword]&lt;br /&gt;@UserName NVarChar(255),&lt;br /&gt;@NewPassword NVarChar(255)&lt;br /&gt;as&lt;br /&gt;begin&lt;br /&gt;Declare @PasswordSalt NVarChar(128)&lt;br /&gt;Declare @ApplicationID NVarChar(255)&lt;br /&gt;Declare @ApplicationName NVarChar(255)&lt;br /&gt;&lt;br /&gt;Set @ApplicationID = (SELECT [ApplicationID] FROM aspnet_Users WHERE UserName=@UserName)&lt;br /&gt;Set @ApplicationName = (SELECT [ApplicationName] FROM aspnet_Applications WHERE ApplicationID=@ApplicationID)&lt;br /&gt;Set @PasswordSalt = (SELECT PasswordSalt FROM aspnet_Membership WHERE UserID IN (SELECT UserID FROM aspnet_Users WHERE UserName=@UserName))&lt;br /&gt;&lt;br /&gt;select @ApplicationID, @ApplicationName&lt;br /&gt;declare @RetVal as int&lt;br /&gt;Exec @RetVal = dbo.aspnet_Membership_ResetPassword @ApplicationName, @UserName, @NewPassword, 10, 10, @PasswordSalt, -5&lt;br /&gt;return @RetVal&lt;br /&gt;end&lt;br /&gt;&lt;br /&gt;-- now run this command with your username and password&lt;br /&gt;uap_ResetPassword 'host','123'&lt;br /&gt;uap_ResetPassword 'admin','456'&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Save your time without wasting time to find the password recovery methods&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-7800815307806108686?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/7800815307806108686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/09/dotnetnuke-password-reset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7800815307806108686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7800815307806108686'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/09/dotnetnuke-password-reset.html' title='DotNetNuke Password Reset'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-7048507513574543583</id><published>2009-09-12T22:41:00.009+05:30</published><updated>2009-09-14T10:15:05.486+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Extended Ajax Calendar Extender</title><content type='html'>Do you want to change the colors of the weekend in the Ajax Calendar extender control.&lt;br /&gt;You have to change the behaviour of a AJAX Control Tool Kit in this way.Fllow my method.&lt;br /&gt;&lt;br /&gt;add CSS to AjaX Control Tool Kit Solution &gt;&gt; Calendar Folder &gt;&gt; Calendar.css&lt;br /&gt;Add one more line..&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;br /&gt;.ajax__calendar_container {padding:4px;cursor:default;width:170px;font-size:11px;text-align:center;font-family:tahoma,verdana,helvetica;}&lt;br /&gt;.ajax__calendar_body {height:139px;width:170px;position:relative;overflow:hidden;margin:auto;}&lt;br /&gt;.ajax__calendar_days, .ajax__calendar_months, .ajax__calendar_years {top:0px;left:0px;height:139px;width:170px;position:absolute;text-align:center;margin:auto;}&lt;br /&gt;.ajax__calendar_container TABLE {padding:0px;margin:0px;font-size:11px;}&lt;br /&gt;.ajax__calendar_container TD {padding:0px;margin:0px;font-size:11px;}&lt;br /&gt;.ajax__calendar_header {height:20px;width:100%;}&lt;br /&gt;.ajax__calendar_prev {cursor:pointer;width:15px;height:15px;float:left;background-repeat:no-repeat;background-position:50% 50%;background-image:url(&lt;%=WebResource("AjaxControlToolkit.Calendar.arrow-left.gif")%&gt;);}&lt;br /&gt;.ajax__calendar_next {cursor:pointer;width:15px;height:15px;float:right;background-repeat:no-repeat;background-position:50% 50%;background-image:url(&lt;%=WebResource("AjaxControlToolkit.Calendar.arrow-right.gif")%&gt;);}&lt;br /&gt;.ajax__calendar_title {cursor:pointer;font-weight:bold;}&lt;br /&gt;.ajax__calendar_footer {height:15px;}&lt;br /&gt;.ajax__calendar_today {cursor:pointer;padding-top:3px;}&lt;br /&gt;.ajax__calendar_dayname {height:17px;width:17px;text-align:right;padding:0 2px;}&lt;br /&gt;.ajax__calendar_day {height:17px;width:18px;text-align:right;padding:0 2px;cursor:pointer;}&lt;br /&gt;.ajax__calendar_month {height:44px;width:40px;text-align:center;cursor:pointer;overflow:hidden;}&lt;br /&gt;.ajax__calendar_year {height:44px;width:40px;text-align:center;cursor:pointer;overflow:hidden;}&lt;br /&gt;.ajax__calendar .ajax__calendar_container {border:1px solid #646464;background-color:#ffffff;color:#000000;}&lt;br /&gt;.ajax__calendar .ajax__calendar_footer {border-top:1px solid #f5f5f5;}&lt;br /&gt;.ajax__calendar .ajax__calendar_dayname {border-bottom:1px solid #f5f5f5;}&lt;br /&gt;.ajax__calendar .ajax__calendar_day {border:1px solid #ffffff;}&lt;br /&gt;.ajax__calendar .ajax__calendar_month {border:1px solid #ffffff;}&lt;br /&gt;.ajax__calendar .ajax__calendar_year {border:1px solid #ffffff;}&lt;br /&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_day {background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_month {background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_year {background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_other .ajax__calendar_day {background-color:#ffffff;border-color:#ffffff;color:#646464;}&lt;br /&gt;.ajax__calendar .ajax__calendar_other .ajax__calendar_year {background-color:#ffffff;border-color:#ffffff;color:#646464;}&lt;br /&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_day {background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_month {background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_year {background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_title {color:#0066cc;}&lt;br /&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_today {color:#0066cc;}&lt;br /&gt;//the upper line is already there.....you have to add this css line&lt;br /&gt;.ajax__calendar .ajax__calendar_new .ajax__calendar_day {color:Red;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;in then CalendarBehavior.js file add code...(modified only bold one) Line Number 1048&lt;br /&gt;&lt;br /&gt;&lt;pre class="Cpp" name="code"&gt;&lt;br /&gt;for (var week = 0; week &lt; weekrow =" this._daysBody.rows[week];" dayofweek =" 0;" daycell =" weekRow.cells[dayOfWeek].firstChild;" title =" currentDate.localeFormat(" date =" currentDate;" currentdate =" new"&gt;&lt;br /&gt;&lt;br /&gt;if (dtf.ShortestDayNames[(dayOfWeek + firstDayOfWeek) % 7] == "Su") {&lt;br /&gt;//if sunday then change the color  &lt;br /&gt;Sys.UI.DomElement.addCssClass(dayCell.parentNode, "ajax__calendar_new");  }&lt;br /&gt;if (dtf.ShortestDayNames[(dayOfWeek + firstDayOfWeek) % 7] == "Sa") {&lt;br /&gt;//if saturday then chagne the color  &lt;br /&gt;Sys.UI.DomElement.addCssClass(dayCell.parentNode, "ajax__calendar_new");  }&lt;br /&gt;} }&lt;br /&gt;&lt;br /&gt;/// you will find this in _performLayout: function() { &lt;summmary&gt;&lt;br /&gt;/// Updates the various views of the calendar to match the current selected and visible dates&lt;br /&gt;/// &lt;/summmary&gt;&lt;br /&gt;switch (this._mode) {&lt;br /&gt;case "days":&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If this helps you please give me your comment and put your new suggestions here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-7048507513574543583?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/7048507513574543583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/09/extended-ajax-calendar-extender.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7048507513574543583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7048507513574543583'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/09/extended-ajax-calendar-extender.html' title='Extended Ajax Calendar Extender'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-4538373843060060739</id><published>2009-08-18T17:05:00.010+05:30</published><updated>2009-09-01T10:13:35.712+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Ajax calendar with drop downs</title><content type='html'>Ajax Calendar control has only one view to display the date.But some of people are not familiar with this view and they want the old classic view with drop downs to select dates.This is what who are looking for the custom calendar control.You can use this as a user control and just drag and drop to the design view to use it.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_9W39D9emr3Y/SpegmRnrQ2I/AAAAAAAAAAs/6skQqttgZYM/s1600-h/cal2.gif"&gt;&lt;img style="cursor: pointer; width: 279px; height: 175px;" src="http://2.bp.blogspot.com/_9W39D9emr3Y/SpegmRnrQ2I/AAAAAAAAAAs/6skQqttgZYM/s320/cal2.gif" alt="" id="BLOGGER_PHOTO_ID_5374941259715265378" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;float:left;width:350px;"&gt;.aspx&lt;/span&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;&lt;%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:textbox id="DateTextFrom" text="" runat="server" width="140" autopostback="true" validationgroup="n"&gt; &lt;%--onFocus="javascript:this.blur();" autocomplete="off"--%&gt;&lt;br /&gt;&lt;asp:requiredfieldvalidator id="DateTextFromRequired" enabled="true" runat="server" controltovalidate="DateTextFrom" errormessage="Date is required"&gt;*&lt;/asp:requiredfieldvalidator&gt;&lt;br /&gt;&lt;br /&gt;  &lt;ajaxtoolkit:filteredtextboxextender id="FilteredTextBoxExtender1" runat="server" targetcontrolid="DateTextFrom" validchars="/,0,1,2,3,4,5,6,7,8,9"&gt;&lt;br /&gt;  &lt;/ajaxtoolkit:filteredtextboxextender&gt;&lt;br /&gt;&lt;br /&gt;  &lt;asp:regularexpressionvalidator id="RegularExpressionValidator3" runat="server" display="None" validationexpression="(0[1-9]|[12][0-9]|3[01])[//.](0[1-9]|1[012])[//.](19|20)\d\d" validationgroup="n" controltovalidate="DateTextFrom" errormessage="Please enter date in valid format(dd/mm/yyyy).Please use calander."&gt;&lt;br /&gt;  &lt;/asp:regularexpressionvalidator&gt;&lt;br /&gt;&lt;br /&gt;   &lt;ajaxtoolkit:validatorcalloutextender id="RegularExpressionValidator3_ValidatorCalloutExtender" runat="server" targetcontrolid="RegularExpressionValidator3"&gt;&lt;br /&gt;   &lt;/ajaxtoolkit:validatorcalloutextender&gt;&lt;br /&gt;&lt;br /&gt;   &lt;asp:requiredfieldvalidator id="RequiredFieldValidator3" runat="server" display="None" errormessage="You have not entered a date. Please check and re-enter." controltovalidate="DateTextFrom" validationgroup="n"&gt;&lt;br /&gt;  &lt;/asp:requiredfieldvalidator&gt;&lt;br /&gt;  &lt;ajaxtoolkit:validatorcalloutextender id="RequiredFieldValidator3_ValidatorCalloutExtender" runat="server" targetcontrolid="RequiredFieldValidator3"&gt;&lt;br /&gt;  &lt;/ajaxtoolkit:validatorcalloutextender&gt;&lt;br /&gt;&lt;br /&gt; &lt;asp:panel id="Panel1" visible="true" runat="server" cssclass="popupControl" style="display: none;"&gt;&lt;br /&gt;      &lt;asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Always"&gt;&lt;br /&gt;          &lt;contenttemplate&gt;&lt;br /&gt;&lt;center&gt;&lt;table&gt;&lt;br /&gt;      &lt;tbody&gt;&lt;tr&gt;&lt;br /&gt;          &lt;td align="left" bgcolor="#cccccc"&gt;&lt;br /&gt;              &lt;asp:dropdownlist id="drpCalMonth" runat="Server" autopostback="True" onselectedindexchanged="Set_Calendar" cssclass="calTitle"&gt;&lt;/asp:dropdownlist&gt;&lt;br /&gt;          &lt;/td&gt;&lt;br /&gt;          &lt;td align="left" bgcolor="#cccccc"&gt;&lt;br /&gt;              &lt;asp:dropdownlist id="drpCalYear" runat="Server" autopostback="True" onselectedindexchanged="Set_Calendar" cssclass="calTitle"&gt;&lt;/asp:dropdownlist&gt;&lt;br /&gt;          &lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;         &lt;tr&gt;&lt;br /&gt;          &lt;td colspan="2"&gt;&lt;br /&gt;                  &lt;asp:calendar id="Calendar1" runat="server" width="160px" daynameformat="Shortest" backcolor="White" bordercolor="#999999" cellpadding="1" names="Verdana" nextmonthtext="" prevmonthtext="" size="8pt" forecolor="Black" onselectionchanged="Calendar1_SelectionChanged"&gt;&lt;br /&gt;                          &lt;selecteddaystyle backcolor="#666666" bold="True" forecolor="White"&gt;&lt;br /&gt;                          &lt;todaydaystyle backcolor="#CCCCCC" forecolor="Black"&gt;&lt;br /&gt;                          &lt;selectorstyle backcolor="#CCCCCC"&gt;&lt;br /&gt;                          &lt;weekenddaystyle backcolor="#FFFFCC"&gt;&lt;br /&gt;                          &lt;othermonthdaystyle forecolor="#808080"&gt;&lt;br /&gt;                          &lt;nextprevstyle verticalalign="Bottom"&gt;&lt;br /&gt;                          &lt;dayheaderstyle backcolor="#CCCCCC" bold="True" size="7pt"&gt;&lt;br /&gt;                          &lt;titlestyle backcolor="#999999" size="7pt" bordercolor="Black" bold="True"&gt;&lt;br /&gt;                  &lt;/titlestyle&gt;&lt;br /&gt;          &lt;/dayheaderstyle&gt;&lt;/nextprevstyle&gt;&lt;/othermonthdaystyle&gt;&lt;/weekenddaystyle&gt;&lt;/selectorstyle&gt;&lt;/todaydaystyle&gt;&lt;/selecteddaystyle&gt;&lt;/asp:calendar&gt;&lt;/td&gt;&lt;br /&gt;      &lt;/tr&gt;&lt;br /&gt;  &lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;              &lt;/center&gt;&lt;br /&gt;          &lt;/contenttemplate&gt;&lt;br /&gt;      &lt;/asp:updatepanel&gt;&lt;br /&gt;  &lt;/asp:panel&gt;&lt;br /&gt;  &lt;ajaxtoolkit:popupcontrolextender id="PopupControlExtender1" runat="server" targetcontrolid="DateTextFrom" popupcontrolid="Panel1" position="Bottom"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/ajaxtoolkit:popupcontrolextender&gt;&lt;/asp:textbox&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;.cs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Configuration;&lt;br /&gt;using System.Collections;&lt;br /&gt;using System.Web;&lt;br /&gt;using System.Web.Security;&lt;br /&gt;using System.Web.UI;&lt;br /&gt;using System.Web.UI.WebControls;&lt;br /&gt;using System.Web.UI.WebControls.WebParts;&lt;br /&gt;using System.Web.UI.HtmlControls;&lt;br /&gt;&lt;br /&gt;public partial class Quote_Engine_CustomAjaxCalender : System.Web.UI.UserControl&lt;br /&gt;{&lt;br /&gt;public string DateTextFromValue&lt;br /&gt;{&lt;br /&gt;  get { return DateTextFrom.Text; }&lt;br /&gt;  set { DateTextFrom.Text = value; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public Boolean DateTextRequired&lt;br /&gt;{&lt;br /&gt;  get { return DateTextFromRequired.Enabled; }&lt;br /&gt;  set { DateTextFromRequired.Enabled = value; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public string DateTextRequiredText&lt;br /&gt;{&lt;br /&gt;  get { return DateTextFromRequired.ErrorMessage; }&lt;br /&gt;  set { DateTextFromRequired.ErrorMessage = value; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//private string theDateTextFrom;&lt;br /&gt;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  if (!Page.IsPostBack)&lt;br /&gt;  {&lt;br /&gt;      Populate_MonthList();&lt;br /&gt;      Populate_YearList();&lt;br /&gt;&lt;br /&gt;      DateTime dt;&lt;br /&gt;      if (DateTextFrom.Text != "")&lt;br /&gt;      {&lt;br /&gt;          dt = DateTime.Parse(DateTextFrom.Text);&lt;br /&gt;          Calendar1.TodaysDate = dt;&lt;br /&gt;      }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// SET THE FIRST CALENDAR (FROM DATE)&lt;br /&gt;public void Set_Calendar(object Sender, EventArgs E)&lt;br /&gt;{&lt;br /&gt;  string theDate = drpCalMonth.SelectedItem.Value + " 1, " + drpCalYear.SelectedItem.Value;&lt;br /&gt;  DateTime dtFoo;&lt;br /&gt;  dtFoo = System.Convert.ToDateTime(theDate);&lt;br /&gt;  Calendar1.TodaysDate = dtFoo;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void Calendar1_SelectionChanged(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;  // Popup result is the selected date&lt;br /&gt;  drpCalMonth.SelectedIndex = Calendar1.SelectedDate.Month - 1;&lt;br /&gt;  drpCalYear.SelectedItem.Selected = false;&lt;br /&gt;  drpCalYear.Items.FindByValue(Calendar1.SelectedDate.Year.ToString()).Selected = true;&lt;br /&gt;&lt;br /&gt;  // Popup result is the selected date&lt;br /&gt;  //PopupControlExtender1.Commit(Calendar1.SelectedDate.ToShortDateString());&lt;br /&gt;  PopupControlExtender1.Commit(Calendar1.SelectedDate.ToString("dd/MM/yyyy"));&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// INNOVATIVE CALENDARS VIA AJAX THAT ALLOW USER TO PICK MONTH AND DATE VIA DROPDOWN&lt;br /&gt;void Populate_MonthList()&lt;br /&gt;{&lt;br /&gt;  drpCalMonth.Items.Add("January");&lt;br /&gt;  drpCalMonth.Items.Add("February");&lt;br /&gt;  drpCalMonth.Items.Add("March");&lt;br /&gt;  drpCalMonth.Items.Add("April");&lt;br /&gt;  drpCalMonth.Items.Add("May");&lt;br /&gt;  drpCalMonth.Items.Add("June");&lt;br /&gt;  drpCalMonth.Items.Add("July");&lt;br /&gt;  drpCalMonth.Items.Add("August");&lt;br /&gt;  drpCalMonth.Items.Add("September");&lt;br /&gt;  drpCalMonth.Items.Add("October");&lt;br /&gt;  drpCalMonth.Items.Add("November");&lt;br /&gt;  drpCalMonth.Items.Add("December");&lt;br /&gt;  //string strMonth;&lt;br /&gt;&lt;br /&gt;  //if (DateTextFrom.Text == "")&lt;br /&gt;  //    strMonth = DateTime.Now.ToString("MMMM");&lt;br /&gt;  //else&lt;br /&gt;&lt;br /&gt;  //    strMonth = Convert.ToDateTime(DateTextFrom.Text).ToString("MMMM");&lt;br /&gt;  //drpCalMonth.Items.FindByValue(strMonth).Selected = true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// POPULATE THE YEARLIST FROM 20 YEARS AGO TO ONE YEAR HENCE&lt;br /&gt;void Populate_YearList()&lt;br /&gt;{&lt;br /&gt;  int intYear;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  // Year list can be changed by changing the lower and upper&lt;br /&gt;  // limits of the For statement&lt;br /&gt;  for (intYear = DateTime.Now.Year - 10; intYear &lt;= DateTime.Now.Year + 10; intYear++)        {            drpCalYear.Items.Add(intYear.ToString());        }         //if (DateTextFrom.Text == "")        //    drpCalYear.Items.FindByValue(DateTime.Now.Year.ToString()).Selected = true;        //else        //{        //    string strYear = Convert.ToDateTime(DateTextFrom.Text).Year.ToString();        //    drpCalYear.Items.FindByValue(strYear).Selected = true;        //}    } }  &lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-4538373843060060739?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/4538373843060060739/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-calender-with-drop-downs_9280.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/4538373843060060739'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/4538373843060060739'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-calender-with-drop-downs_9280.html' title='Ajax calendar with drop downs'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_9W39D9emr3Y/SpegmRnrQ2I/AAAAAAAAAAs/6skQqttgZYM/s72-c/cal2.gif' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-5373689805226547208</id><published>2009-08-18T16:03:00.012+05:30</published><updated>2009-09-16T22:11:25.296+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Ajax Calendar Themes</title><content type='html'>&lt;span xmlns=''&gt;&lt;p&gt;Most of the people like to give a different look and feel to the calendar control. There are two themes for Ajax Calendar. This will help you to modify your calendar view.&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;a href='http://1.bp.blogspot.com/_9W39D9emr3Y/SpeeXztAxhI/AAAAAAAAAAk/2nKoGdaKoZs/s1600-h/cal1.gif'&gt;&lt;img border='0' alt='' src='http://1.bp.blogspot.com/_9W39D9emr3Y/SpeeXztAxhI/AAAAAAAAAAk/2nKoGdaKoZs/s320/cal1.gif'/&gt;&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;br/&gt;&lt;br/&gt;/* Start - Calander Styles */&lt;br/&gt;.ajax__calendar_container&lt;br/&gt;{padding:4px;position:absolute;cursor:default;width:170px;font-size:11px;&lt;br/&gt;text-align:center;font-family:tahoma,verdana,helvetica;}&lt;br/&gt;.ajax__calendar_body&lt;br/&gt;{height:139px;width:170px;position:relative;overflow:hidden;margin:auto; }&lt;br/&gt;.ajax__calendar_days, .ajax__calendar_months, .ajax__calendar_years&lt;br/&gt;{top:0px;left:0px;height:139px;width:170px;position:absolute;&lt;br/&gt;text-align:center;margin:auto;}&lt;br/&gt;.ajax__calendar_container TABLE {font-size:11px;}&lt;br/&gt;.ajax__calendar_header {height:20px; background-color:#63B2DB;width:100%;}&lt;br/&gt;.ajax__calendar_prev&lt;br/&gt;{cursor:pointer;width:15px;height:15px;float:left;&lt;br/&gt;background-repeat:no-repeat;background-position:50% 50%;&lt;br/&gt;background-image:&lt;br/&gt;url();}&lt;br/&gt;.ajax__calendar_next&lt;br/&gt;{cursor:pointer;width:15px;height:15px;float:right;&lt;br/&gt;background-repeat:no-repeat;background-position:50% 50%;&lt;br/&gt;background-image:&lt;br/&gt;url();}&lt;br/&gt;.ajax__calendar_title {cursor:pointer;font-weight:bold;}&lt;br/&gt;.ajax__calendar_footer {height:15px; background-color:#63B2DB;}&lt;br/&gt;.ajax__calendar_today {cursor:pointer;padding-top:3px;}&lt;br/&gt;.ajax__calendar_dayname {height:17px;width:18px;text-align:right;padding:0 2px;}&lt;br/&gt;.ajax__calendar_day&lt;br/&gt;{height:17px;width:18px;text-align:right;padding:0 2px;cursor:pointer;}&lt;br/&gt;.ajax__calendar_month&lt;br/&gt;{height:44px;width:40px;text-align:center;cursor:pointer;overflow:hidden;}&lt;br/&gt;.ajax__calendar_year&lt;br/&gt;{height:44px;width:40px;text-align:center;cursor:pointer;overflow:hidden;}&lt;br/&gt;.ajax__calendar .ajax__calendar_container&lt;br/&gt;{border:1px solid #646464;background-color:#ffffff;color:#000000;}&lt;br/&gt;.ajax__calendar .ajax__calendar_footer {border-top:1px solid #f5f5f5;}&lt;br/&gt;.ajax__calendar .ajax__calendar_dayname {border-bottom:1px solid #f5f5f5;}&lt;br/&gt;.ajax__calendar .ajax__calendar_day {border:1px solid #ffffff;}&lt;br/&gt;.ajax__calendar .ajax__calendar_month {border:1px solid #ffffff;}&lt;br/&gt;.ajax__calendar .ajax__calendar_year {border:1px solid #ffffff;}&lt;br/&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_day&lt;br/&gt;{background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_month&lt;br/&gt;{background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_active .ajax__calendar_year&lt;br/&gt;{background-color:#edf9ff;border-color:#0066cc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_other .ajax__calendar_day&lt;br/&gt;{background-color:#ffffff;border-color:#ffffff;color:#ffffff;cursor:default;}&lt;br/&gt;.ajax__calendar .ajax__calendar_other .ajax__calendar_month&lt;br/&gt;{background-color:#ffffff;border-color:#ffffff;color:#ffffff;cursor:default;}&lt;br/&gt;.ajax__calendar .ajax__calendar_other .ajax__calendar_year&lt;br/&gt;{background-color:#ffffff;border-color:#ffffff;color:#ffffff;cursor:default;}&lt;br/&gt;.ajax__calendar .ajax__calendar_today .ajax__calendar_day&lt;br/&gt;{background-color:#fff2a8;}&lt;br/&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_day&lt;br/&gt;{background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_month&lt;br/&gt;{background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_year&lt;br/&gt;{background-color:#edf9ff;border-color:#daf2fc;color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_title {color:#0066cc;}&lt;br/&gt;.ajax__calendar .ajax__calendar_hover .ajax__calendar_today {color:#0066cc;}&lt;br/&gt;&lt;br/&gt;/* End - Calander Styles */&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;This is the second theme and you should use the class name inside the calendar control like this.&lt;br/&gt;&lt;br/&gt;&lt;strong&gt;.aspx&lt;/strong&gt;&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;.css&lt;br/&gt;&lt;br/&gt;&lt;br /&gt;			&lt;/p&gt;&lt;p&gt;&lt;pre&gt;&lt;code&gt;&lt;br/&gt;/*Start Cal Theme */&lt;br/&gt;.cal_The .ajax__calendar_container&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;background-color: #63B2DB; border:solid 0px #cccccc;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_header&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;background-color: #63B2DB; margin-bottom: 4px;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_title&lt;br/&gt;{&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_next,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_prev&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;color: #004080; padding-top: 3px;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_body&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;background-color: #FFFFFF; border: solid 1px #cccccc;&lt;br/&gt;/*e9e9e9*/&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_dayname&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;text-align:center; font-weight:bold; margin-bottom: 4px; margin-top: 2px;&lt;br/&gt;background-color: #ffffff;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_day&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;text-align:center;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_hover .ajax__calendar_day,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_hover .ajax__calendar_month,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_hover .ajax__calendar_year,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_active&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;color: #004080; font-weight:bold; background-color: #ffffff;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_today&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;font-weight:bold;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_other,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_hover .ajax__calendar_today,&lt;br/&gt;&lt;br/&gt;.cal_The .ajax__calendar_hover .ajax__calendar_title&lt;br/&gt;&lt;br/&gt;{&lt;br/&gt;color: #bbbbbb;&lt;br/&gt;&lt;br/&gt;}&lt;br/&gt;/*End Cal Theme*/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;I have added the simple example for the above style sheet as the Deepak's request.&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-5373689805226547208?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/5373689805226547208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-calender-themes.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5373689805226547208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5373689805226547208'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-calender-themes.html' title='Ajax Calendar Themes'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_9W39D9emr3Y/SpeeXztAxhI/AAAAAAAAAAk/2nKoGdaKoZs/s72-c/cal1.gif' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-923161658812331302</id><published>2009-08-17T18:49:00.020+05:30</published><updated>2009-08-18T14:24:47.522+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='Reorder List'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Ajax Reorder list with database-Issues &amp; solutions</title><content type='html'>Ajax control toolkit is providing us a great control called ReoderList with lot of features. But there is not a direct method to deal with the database records. Anyway today I am bringing you a solution for this. This will view details from the database table in the reorderlist with both images and text. Not only that. It will update the new order to the database field once you change the order. I have tested this and this is my working code. You should change the commands in the SqlDataSource and change the field names in .cs file to your table field names.&lt;br /&gt;&lt;br /&gt;You'd better keep remember this too for the best result. This will require the new release of the Ajax control toolkit and new framework of .net like 3.5.Because it is using Linq in .cs code. I found another issue and I have written to Microsoft people about this. Reorderlist control is not working in their IE 8 old version. I have mentioned this in my previous post. You can try with install new version of that browser and test it too. &lt;br /&gt;.aspx&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt; &lt;br /&gt;&amp;lt;asp:UpdatePanel ID=&amp;quot;Up1&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;                 &amp;lt;ContentTemplate&amp;gt;&lt;br /&gt;           &lt;br /&gt;            &amp;lt;div class=&amp;quot;reorderListDemo&amp;quot;&amp;gt;&lt;br /&gt;                &amp;lt;ajaxtoolkit:ReorderList ID=&amp;quot;ReorderList1&amp;quot; runat=&amp;quot;server&amp;quot; &lt;br /&gt;                                        AllowReorder=&amp;quot;True&amp;quot; &lt;br /&gt;                                        PostBackOnReorder=&amp;quot;true&amp;quot;&lt;br /&gt;                                        DataSourceID=&amp;quot;SqlDataSource1&amp;quot; &lt;br /&gt;                                        CallbackCssStyle=&amp;quot;callbackStyle&amp;quot; &lt;br /&gt;                                        DragHandleAlignment=&amp;quot;Right&amp;quot;&lt;br /&gt;                                        ItemInsertLocation=&amp;quot;End&amp;quot;&lt;br /&gt;                                        DataKeyField=&amp;quot;id&amp;quot;&lt;br /&gt;                                        EnableViewState=&amp;quot;true&amp;quot;&lt;br /&gt;                                        SortOrderField=&amp;quot;oderId&amp;quot;&lt;br /&gt;                                        Width=&amp;quot;500px&amp;quot;&lt;br /&gt;                                        &amp;gt;&lt;br /&gt;                                        &lt;br /&gt;                                        &amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;                                            &amp;lt;div style=&amp;quot;width:300px; display:inline; vertical-align:top;&amp;quot;&amp;gt;&lt;br /&gt;                                            &lt;br /&gt;                                        &amp;lt;div style=&amp;quot;width:50px;float:left; vertical-align:middle; padding-top:40px; &amp;quot;&amp;gt;  &amp;lt;asp:Label ID=&amp;quot;Label2&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# HttpUtility.HtmlEncode(Convert.ToString(Eval(&amp;quot;oderId&amp;quot;))) %&amp;gt;' /&amp;gt; &amp;lt;/div&amp;gt; &amp;lt;%--&amp;lt;%#  HttpUtility.HtmlEncode(Convert.ToString(Convert.ToInt32(Eval(&amp;quot;oderId&amp;quot;))+1))%&amp;gt;--%&amp;gt;&lt;br /&gt;                                        &amp;lt;div style=&amp;quot;width:150px;float:left;&amp;quot;&amp;gt;   &amp;lt;asp:Image Width=&amp;quot;100px&amp;quot;  ID=&amp;quot;Image1&amp;quot; runat=&amp;quot;server&amp;quot; ImageUrl='&amp;lt;%# DataBinder.Eval(Container.DataItem, &amp;quot;image_name&amp;quot;, &amp;quot;~/DesktopModules/Ricette/imgUpload/tmp/tbn{0}&amp;quot;)%&amp;gt;' /&amp;gt; &amp;lt;/div&amp;gt;&lt;br /&gt;                                        &amp;lt;div style=&amp;quot;width:70px;float:left;&amp;quot;&amp;gt;   &amp;lt;asp:ImageButton CommandName=&amp;quot;Delete&amp;quot; ImageUrl=&amp;quot;imgUpload/basket.png&amp;quot; ID=&amp;quot;ImageButton1&amp;quot; runat=&amp;quot;server&amp;quot; Height=&amp;quot;70px&amp;quot; Width=&amp;quot;56px&amp;quot; /&amp;gt; &amp;lt;/div&amp;gt;                                          &lt;br /&gt;&lt;br /&gt;                                            &amp;lt;/div&amp;gt;&lt;br /&gt;                                        &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;                                        &amp;lt;EditItemTemplate&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:TextBox ID=&amp;quot;TextBox1&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# Bind(&amp;quot;image_name&amp;quot;) %&amp;gt;' /&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:TextBox ID=&amp;quot;TextBox2&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# Bind(&amp;quot;id&amp;quot;) %&amp;gt;' /&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:TextBox ID=&amp;quot;TextBox3&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# Bind(&amp;quot;title_id&amp;quot;) %&amp;gt;' /&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:TextBox ID=&amp;quot;TextBox5&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# Bind(&amp;quot;oderId&amp;quot;) %&amp;gt;' /&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:TextBox ID=&amp;quot;TextBox6&amp;quot; runat=&amp;quot;server&amp;quot; Text='&amp;lt;%# Bind(&amp;quot;published&amp;quot;) %&amp;gt;' /&amp;gt;&lt;br /&gt;                                        &amp;lt;/EditItemTemplate&amp;gt;&lt;br /&gt;                                        &amp;lt;ReorderTemplate&amp;gt;&lt;br /&gt;                                            &amp;lt;asp:Panel ID=&amp;quot;Panel1&amp;quot; runat=&amp;quot;server&amp;quot; CssClass=&amp;quot;reorderCue&amp;quot; /&amp;gt;&lt;br /&gt;                                        &amp;lt;/ReorderTemplate&amp;gt;&lt;br /&gt;                                        &amp;lt;DragHandleTemplate&amp;gt;&lt;br /&gt;                                            &amp;lt;div style=&amp;quot;height:99px; width:100px; cursor:move; float:left;&amp;quot;&amp;gt;&lt;br /&gt;                                                &amp;lt;asp:Image runat=&amp;quot;server&amp;quot; ImageUrl=&amp;quot;~/DesktopModules/Ricette/imgUpload/hand.gif&amp;quot; /&amp;gt;&lt;br /&gt;                                             &amp;lt;/div&amp;gt;&lt;br /&gt;                                        &amp;lt;/DragHandleTemplate&amp;gt;&lt;br /&gt;                                        &lt;br /&gt;                                        &amp;lt;InsertItemTemplate&amp;gt;&lt;br /&gt;                                            &amp;lt;div style=&amp;quot;padding-left:5px; float:none; border-bottom:thin solid transparent;&amp;quot;&amp;gt;&lt;br /&gt;                                                &amp;lt;asp:Panel ID=&amp;quot;Panel2&amp;quot; runat=&amp;quot;server&amp;quot; DefaultButton=&amp;quot;Button1&amp;quot; Width=&amp;quot;650px&amp;quot; &amp;gt;&lt;br /&gt;                                                        &amp;lt;asp:Button ID=&amp;quot;Button1&amp;quot; runat=&amp;quot;server&amp;quot;  CommandName=&amp;quot;Insert&amp;quot; Text=&amp;quot;Refresh and Publish&amp;quot; /&amp;gt;&lt;br /&gt;                                                &amp;lt;/asp:Panel&amp;gt;&lt;br /&gt;                                            &amp;lt;/div&amp;gt;&lt;br /&gt;                                        &amp;lt;/InsertItemTemplate&amp;gt;&lt;br /&gt;                                        &lt;br /&gt;                &amp;lt;/ajaxtoolkit:ReorderList&amp;gt;&lt;br /&gt;            &amp;lt;/div&amp;gt;&lt;br /&gt;                &amp;lt;asp:SqlDataSource ID=&amp;quot;SqlDataSource1&amp;quot; runat=&amp;quot;server&amp;quot; &lt;br /&gt;                ConnectionString=&amp;quot;&amp;lt;%$ ConnectionStrings:SiteSqlServer %&amp;gt;&amp;quot; &lt;br /&gt;                DeleteCommand=&amp;quot;DELETE FROM [Ricette_Images] WHERE [id] = @id&amp;quot; &lt;br /&gt;                InsertCommand=&amp;quot;INSERT INTO [Ricette_Images] ([title_id], [image_name], [oderId], [published]) VALUES (@title_id, @image_name, @oderId, @published) DELETE FROM [Ricette_Images] WHERE [image_name] = 'noname'&amp;quot; &lt;br /&gt;                SelectCommand=&amp;quot;SELECT [id], [title_id], [image_name], [oderId], [published] FROM [Ricette_Images] WHERE [title_id] = @title_id order by oderId asc&amp;quot; &lt;br /&gt;                UpdateCommand=&amp;quot;UPDATE [Ricette_Images] SET [title_id] = @title_id, [image_name] = @image_name, [oderId] = @oderId, [published] = @published WHERE [id] = @id&amp;quot;&amp;gt;&lt;br /&gt;                &lt;br /&gt;                &amp;lt;SelectParameters&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;title_id&amp;quot; Type=&amp;quot;String&amp;quot; DefaultValue=&amp;quot;&amp;lt;%= title_id %&amp;gt;&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;/SelectParameters&amp;gt;&lt;br /&gt;                &amp;lt;DeleteParameters&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;id&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;/DeleteParameters&amp;gt;&lt;br /&gt;                &amp;lt;UpdateParameters&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;title_id&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;image_name&amp;quot; Type=&amp;quot;String&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;oderId&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;published&amp;quot; Type=&amp;quot;Boolean&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;id&amp;quot; Type=&amp;quot;Int32&amp;quot; /&amp;gt;&lt;br /&gt;                &amp;lt;/UpdateParameters&amp;gt;&lt;br /&gt;                &amp;lt;InsertParameters&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;title_id&amp;quot; Type=&amp;quot;Int32&amp;quot; DefaultValue=&amp;quot;111&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;image_name&amp;quot; Type=&amp;quot;String&amp;quot; DefaultValue=&amp;quot;noname&amp;quot; /&amp;gt;&lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;oderId&amp;quot; Type=&amp;quot;Int32&amp;quot; DefaultValue=&amp;quot;11&amp;quot; /&amp;gt; &lt;br /&gt;                    &amp;lt;asp:Parameter Name=&amp;quot;published&amp;quot; Type=&amp;quot;Boolean&amp;quot; DefaultValue=&amp;quot;false&amp;quot;/&amp;gt;&lt;br /&gt;                &amp;lt;/InsertParameters&amp;gt;&lt;br /&gt;            &amp;lt;/asp:SqlDataSource&amp;gt;&lt;br /&gt;            &lt;br /&gt;                &amp;lt;/ContentTemplate&amp;gt;&lt;br /&gt;            &amp;lt;/asp:UpdatePanel&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;.cs&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt; &lt;br /&gt;protected void ReorderList1_ItemReorder(object sender, AjaxControlToolkit.ReorderListItemReorderEventArgs e)&lt;br /&gt;{&lt;br /&gt;//get Old Priority&lt;br /&gt;int oldI = e.OldIndex;&lt;br /&gt;//get New Priority&lt;br /&gt;int newI = e.NewIndex;&lt;br /&gt;//get the selected Item Value&lt;br /&gt;string selectedDK = ReorderList1.DataKeys[oldI].ToString();&lt;br /&gt;string i2updateList = "";&lt;br /&gt;//Build update list based on everything after/equal to the new priority but not equal to the selected one and in order so they can be updated in order&lt;br /&gt;SqlConnection oConn = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("SiteSqlServer"));&lt;br /&gt;{&lt;br /&gt;SqlCommand sqlCmd = new SqlCommand("select id from Ricette_Images where id &lt;&gt; '" + selectedDK + "' and oderId &gt;= '" + newI + "' order by oderId asc", oConn);&lt;br /&gt;oConn.Open();&lt;br /&gt;using (SqlDataReader reader = sqlCmd.ExecuteReader())&lt;br /&gt;{&lt;br /&gt;while (reader.Read())&lt;br /&gt;{&lt;br /&gt;if (string.IsNullOrEmpty(i2updateList))&lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;i2updateList = reader["id"].ToString();&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt; &lt;br /&gt;i2updateList += "," + reader["id"].ToString();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;int newPriority = newI;&lt;br /&gt;string[] rolArr = null;&lt;br /&gt;rolArr = i2updateList.Split(',');&lt;br /&gt;//update each from the list by 1&lt;br /&gt;foreach (var x in rolArr)&lt;br /&gt;{&lt;br /&gt;newPriority = newPriority + 1;&lt;br /&gt;SqlConnection myConnection = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("SiteSqlServer"));&lt;br /&gt;{&lt;br /&gt;myConnection.Open();&lt;br /&gt;SqlCommand myCommand = new SqlCommand("update Ricette_Images set oderId = '" + newPriority + "' where id='" + x + "'", myConnection);&lt;br /&gt; &lt;br /&gt;myCommand.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt; &lt;br /&gt;newPriority = newPriority;&lt;br /&gt;}&lt;br /&gt;//finally, update the selected one for its changed priority&lt;br /&gt;SqlConnection myConne = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("SiteSqlServer"));&lt;br /&gt;{&lt;br /&gt;myConne.Open();&lt;br /&gt;SqlCommand myCommand = new SqlCommand("update Ricette_Images set oderId = '" + newI.ToString() + "' where id='" + selectedDK + "'", myConne);&lt;br /&gt;myCommand.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;void ReorderList1_ItemCommand(object sender, AjaxControlToolkit.ReorderListCommandEventArgs e, AjaxControlToolkit.ReorderListItemReorderEventArgs ee)&lt;br /&gt;{&lt;br /&gt;int oldI = ee.OldIndex;//get Old Priority&lt;br /&gt;string selectedDK = ReorderList1.DataKeys[oldI].ToString();//get the selected Item Value&lt;br /&gt;// If you want support for multiple commands&lt;br /&gt;SqlConnection myConnect = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("SiteSqlServer"));&lt;br /&gt;myConnect.Open();&lt;br /&gt;if (e.CommandName == "Delete")&lt;br /&gt;//return;&lt;br /&gt;{&lt;br /&gt;//DELETE FROM [Ricette_Images] WHERE [id] = @id&lt;br /&gt;SqlCommand myCommand = new SqlCommand("DELETE FROM Ricette_Images where id='" + selectedDK + "'", myConnect);&lt;br /&gt;myCommand.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt;if (e.CommandName == "Select")&lt;br /&gt;//return;&lt;br /&gt;{&lt;br /&gt;int titleid = Convert.ToInt32(HttpContext.Current.Session["RecordID"]);&lt;br /&gt;//SqlDataSource1.SelectParameters.Add("userNum", userNum);&lt;br /&gt;SqlDataSource1.SelectParameters.Add("@title_id", titleid.ToString());&lt;br /&gt;//SELECT [id], [title_id], [image_name], [oderId], [published] FROM [Ricette_Images] WHERE [title_id] = title_id order by oderId asc"&lt;br /&gt;SqlCommand sqlCmd = new SqlCommand("select [id], [title_id], [image_name], [oderId], [published] from Ricette_Images where title_id ='" + titleid + "' order by oderId DESC", myConnect);&lt;br /&gt;sqlCmd.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt;if (e.CommandName == "Insert")&lt;br /&gt;//return;&lt;br /&gt;{&lt;br /&gt;string imgNullName = "t";&lt;br /&gt;SqlCommand myCommandCheckNull = new SqlCommand("DELETE FROM Ricette_Images where image_name='" + imgNullName + "'", myConnect);&lt;br /&gt;myCommandCheckNull.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt;if (e.CommandName == "Refresh")&lt;br /&gt;//return;&lt;br /&gt;{&lt;br /&gt;int Currenttitleid = Convert.ToInt32(HttpContext.Current.Session["RecordID"]);&lt;br /&gt;bool Newpublished = true;&lt;br /&gt;SqlConnection myConnect1 = new SqlConnection(System.Configuration.ConfigurationSettings.AppSettings.Get("SiteSqlServer"));&lt;br /&gt;{&lt;br /&gt;myConnect1.Open();&lt;br /&gt;SqlCommand myCommand = new SqlCommand("update Ricette_Images set published = '" + Newpublished + "' where title_id='" + Currenttitleid + "'", myConnect1);&lt;br /&gt;myCommand.ExecuteNonQuery();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;.css&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;&lt;br /&gt;&lt;style type="text/css"&gt;&lt;br /&gt;    &lt;br /&gt;    /*Reorder List*/&lt;br /&gt;    .dragHandle&lt;br /&gt;    {&lt;br /&gt;     &lt;br /&gt;     &lt;br /&gt;        width:  99px;&lt;br /&gt;        height: 99px;&lt;br /&gt;        cursor:move;&lt;br /&gt;      /*  background-color:Transparent; &lt;br /&gt;        &lt;br /&gt;        background-color:Blue;&lt;br /&gt;        background-image: url(~/DesktopModules/Ricette/imgUpload/hand.gif); */&lt;br /&gt;    }&lt;br /&gt;    .callbackStyle&lt;br /&gt;    {&lt;br /&gt;        border: thin blue inset;&lt;br /&gt;    }&lt;br /&gt;    .callbackStyle table&lt;br /&gt;    {&lt;br /&gt;        background-color: #5377A9;&lt;br /&gt;        color: Black;&lt;br /&gt;    }&lt;br /&gt;    .reorderListDemo li&lt;br /&gt;    {&lt;br /&gt;        list-style: none;&lt;br /&gt;        margin: 2px;&lt;br /&gt;        background-image: url(images/bg_nav.gif);&lt;br /&gt;        background-repeat: repeat-x;&lt;br /&gt;        color: #FFF;&lt;br /&gt;    }&lt;br /&gt;    .reorderListDemo li a&lt;br /&gt;    {&lt;br /&gt;        color: #FFF !important;&lt;br /&gt;        font-weight: bold;&lt;br /&gt;    }&lt;br /&gt;    .reorderCue&lt;br /&gt;    {&lt;br /&gt;        border: dashed thin black;&lt;br /&gt;        width: 100%;&lt;br /&gt;        /*height: 25px;*/&lt;br /&gt;    }&lt;br /&gt;    .itemArea&lt;br /&gt;    {&lt;br /&gt;        margin-left: 15px;&lt;br /&gt;        font-family: Arial, Verdana, sans-serif;&lt;br /&gt;        font-size: 1em;&lt;br /&gt;        text-align: left;&lt;br /&gt;    }&lt;br /&gt;   &lt;br /&gt;&lt;/style&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;SQL&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;CREATE TABLE [dbo].[Ricette_Images](&lt;br /&gt; [id] [int] IDENTITY(1,1) NOT NULL,&lt;br /&gt; [title_id] [int] NULL,&lt;br /&gt; [image_name] [varchar](500) NULL CONSTRAINT [DF_Ricette_Images_image_name]  DEFAULT ('img'),&lt;br /&gt; [oderId] [int] NULL,&lt;br /&gt; [published] [bit] NULL CONSTRAINT [DF_Ricette_Images_published]  DEFAULT ((0)),&lt;br /&gt; CONSTRAINT [PK_Ricette_Images] PRIMARY KEY CLUSTERED &lt;br /&gt;(&lt;br /&gt; [id] ASC&lt;br /&gt;)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]&lt;br /&gt;) ON [PRIMARY]&lt;br /&gt;&lt;br /&gt;GO&lt;br /&gt;SET ANSI_PADDING OFF&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Welcome for your comments and for your questions.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-923161658812331302?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/923161658812331302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-reorder-list-issues-and-solutions.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/923161658812331302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/923161658812331302'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-reorder-list-issues-and-solutions.html' title='Ajax Reorder list with database-Issues &amp; solutions'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-5755973361001769124</id><published>2009-08-17T18:48:00.005+05:30</published><updated>2009-08-18T16:49:50.739+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Select a future date with Ajax Calendar</title><content type='html'>There is not a method to validate future or past date in Ajax CalendarExtender Control. This is the JavaScript to set validate the Ajax calendar for future date. If you want to validate past date ,you have to do only change the comparison symbol.&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;    &amp;lt;script language=&lt;span class="str"&gt;&amp;quot;javascript&amp;quot;&lt;/span&gt; type=&lt;span class="str"&gt;&amp;quot;text/javascript&amp;quot;&lt;/span&gt;&amp;gt;&lt;br /&gt;        &lt;span class="kwrd"&gt;function&lt;/span&gt; checkDate(sender,args)&lt;br /&gt;            {       &lt;br /&gt;                &lt;span class="kwrd"&gt;if&lt;/span&gt; (sender._selectedDate &amp;lt; &lt;span class="kwrd"&gt;new&lt;/span&gt; Date())&lt;br /&gt;                {&lt;br /&gt;                    alert(&lt;span class="str"&gt;&amp;quot;You must select a date in the future.&amp;quot;&lt;/span&gt;);&lt;br /&gt;                   &lt;br /&gt;                    &lt;span class="rem"&gt;//create the date&lt;/span&gt;&lt;br /&gt;                    &lt;span class="kwrd"&gt;var&lt;/span&gt; myDate = &lt;span class="kwrd"&gt;new&lt;/span&gt; Date();&lt;br /&gt;                    &lt;span class="rem"&gt;//add a day to the date&lt;/span&gt;&lt;br /&gt;                    myDate.setDate(myDate.getDate() + 1);&lt;br /&gt;                    sender._selectedDate = myDate;  &lt;span class="rem"&gt;//new Date();&lt;/span&gt;&lt;br /&gt;                    &lt;span class="rem"&gt;// set the date back to the current date&lt;/span&gt;&lt;br /&gt;                    sender._textbox.set_Value(sender._selectedDate.format(sender._format))&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;    &amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-5755973361001769124?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/5755973361001769124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/select-future-date-with-ajax-calender.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5755973361001769124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5755973361001769124'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/select-future-date-with-ajax-calender.html' title='Select a future date with Ajax Calendar'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-1569589535564224503</id><published>2009-08-17T18:37:00.014+05:30</published><updated>2009-08-18T16:55:21.098+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='calendar'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>New Ajax Calendar with new feature</title><content type='html'>I have posted a solution before for an Ajax calendar with drop downs.But there is a control called CalendarExtenderPlus .you can find it from http://lionsden.co.il/codeden/?p=222 .This control has developed by Hanan Schwartzberg.But there were some issues.Anyway Hanan could fix some of the issues.But I noted there was an issue when we are using this control with other Ajax controls.The issue was can not select a date after the first selection.Because calendar control is getting stuck.We were sending more than 30 messages to each other to figure out the issue.Anyway finally I could find the issue.That was 2 java script errors. &lt;br /&gt;The error was &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Microsoft JScript runtime error: Sys.InvalidOperationException: Type Sys.Timer has already been registered.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Anyway I found this solution for this.You should modify the ScriptManager code like this.Then everything will work fine.Thank you very much for your great work Hanan.I just put pepper and salt on to it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre name="code" class="Cpp"&gt;&lt;br /&gt;&lt;br /&gt;&lt;asp:ScriptManager ID="ScriptManager1" &lt;br /&gt;        runat="server"&lt;br /&gt;        EnablePageMethods="true"  &lt;br /&gt;        EnableScriptGlobalization="true"  &lt;br /&gt;        ScriptMode="Release" /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I recommend to install AJAX Control Toolkit May 2009 Release or later version like Version 3.0.30512 for best result with this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-1569589535564224503?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/1569589535564224503/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/new-ajax-calender-with-new-feature.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/1569589535564224503'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/1569589535564224503'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/new-ajax-calender-with-new-feature.html' title='New Ajax Calendar with new feature'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-6831293397260197975</id><published>2009-08-10T11:45:00.006+05:30</published><updated>2009-08-10T12:12:34.334+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>File uploading with Ajax without a page refresh</title><content type='html'>This is a common issue what .net developers are facing frequently who are following the general methods with Ajax update panel.Can you use the file upload control in the update panel for not to refresh the page when you are uploading a file?Simple answer is no.Because it needs a full page post back and if you use a AsyncPostBackTrigger as a trigger will give an Error.Because the result is something like FileUpload1.HasFile = False. This is what Microsoft people has missed in their Ajax controls techniques. But we will go through this challenge and I will show you my solution below.&lt;br /&gt;&lt;br /&gt;The Best solution is Keep the file uploading in a different .aspx page an call it via an Iframe.you can retrieve all information of upload page in the Iframe by a java script. This will act as same way like in update panel. I know most of developers are wasting their time to find a solution for this.Hope this will help you all to this common issue.  If you want the sample code do not hesitate to ask me.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-6831293397260197975?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/6831293397260197975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/file-uploading-with-ajax-without.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6831293397260197975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/6831293397260197975'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/file-uploading-with-ajax-without.html' title='File uploading with Ajax without a page refresh'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-5995250270026501943</id><published>2009-08-07T12:11:00.002+05:30</published><updated>2009-08-07T21:20:49.897+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='Silverlight'/><title type='text'>Silverlight challenges !</title><content type='html'>Microsoft has introduced a new interactive interface objects called Silverlight which was something like a replacement for Flash.Actually it was challenge to Microsoft because they did not have a technique like Flash.Anyway They hope to develop this components more user friendly and easy to use to developers.As we know they were always first in this.But their first version was more complicated and lot of bugs I found.But they found a IDE like Blend to overcome this issue.But Users should have the knowledge of new web language XAML which was built on XML concepts.But now it has come silverlight 3.0 .But still there are some conflicts to get familiar with Silverlight.I saw main three issues with Silverlight technology.&lt;br /&gt;&lt;br /&gt;1. It requires more hardware requirements.&lt;br /&gt;2. It should have a Fast Internet Connection.It is taking a long time to download to the client machine.&lt;br /&gt;3. It is taking long time to develop with comparing to their other components like Visual Studio controls.&lt;br /&gt;&lt;br /&gt;I think Nobody can give a solution for first two issues with current versions.Otherwise Microsoft should go to a new light version.&lt;br /&gt;&lt;br /&gt;But for the third one I got a cool solution.There are more than 60 silver light components and absolutely free to use.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devexpress.com/Products/Free/WebRegistration60/Index.xml"&gt;Silverlight Components&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;At the moment I am using this controls and saved my time.I will come with more experience in the future again.I have some other solutions.But still I am using them.If they work fine I will share them with you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-5995250270026501943?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/5995250270026501943/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/silverlight-challenges.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5995250270026501943'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/5995250270026501943'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/silverlight-challenges.html' title='Silverlight challenges !'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-392740553691781763</id><published>2009-08-06T15:16:00.000+05:30</published><updated>2009-08-07T15:44:45.354+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax Issues'/><title type='text'>Ajax Issues with .NET Framework</title><content type='html'>Ajax is a cool piece of cake that we are using in our application. It is not only giving the user interaction.But also saving our development time too.Microsoft people has invented Ajax control tool kit to the .NET Framework.But I saw some of issues with this and could found solutions by working on them with wasting hours and hours.I thought to share my AJAX experiences with all of you and have your feedback what you found.Hope this will save your time.&lt;br /&gt;&lt;br /&gt;1.Version Compatibility.&lt;br /&gt;Ajax control Tool Kit version 1 and 2 is most suitable with .NET Framework 2.0.But I recommended to use Ajax control tool kit version 3 with new 3.5 framework.If you are getting an error with asking for an assembly reference the best solution is restore the new version of the Ajax control tool kit and do not forget to look at the web.config file and add the reference like this.This will change according to the error.&lt;br /&gt;&lt;br /&gt;&lt;pre class="coloredcode"&gt;     &lt;assemblies&gt;&lt;br /&gt;  &lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; assembly=&lt;/span&gt;&lt;span class="attrv"&gt;"System.Core, Version=3.5.0.0, Culture=neutral,&lt;br /&gt;     PublicKeyToken=B77A5C561934E089"&lt;/span&gt;/&gt;&lt;br /&gt;  &lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; assembly=&lt;/span&gt;&lt;span class="attrv"&gt;"System.Web.Extensions, Version=3.5.0.0,&lt;br /&gt;     Culture=neutral,PublicKeyToken=31BF3856AD364E35"&lt;/span&gt;/&gt;&lt;br /&gt;  &lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; assembly=&lt;/span&gt;&lt;span class="attrv"&gt;"System.Data.DataSetExtensions, Version=3.5.0.0,&lt;br /&gt;     Culture=neutral,PublicKeyToken=B77A5C561934E089"&lt;/span&gt;/&gt;&lt;br /&gt;  &lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; assembly=&lt;/span&gt;&lt;span class="attrv"&gt;"System.Xml.Linq, Version=3.5.0.0,&lt;br /&gt;     Culture=neutral,PublicKeyToken=B77A5C561934E089"&lt;/span&gt;/&gt;&lt;br /&gt;  &lt;&lt;span class="tag"&gt;add&lt;/span&gt;&lt;span class="attr"&gt; assembly=&lt;/span&gt;&lt;span class="attrv"&gt;"System.Data.Linq, Version=3.5.0.0,&lt;br /&gt;     Culture=neutral,PublicKeyToken=B77A5C561934E089"&lt;/span&gt;/&gt;&lt;br /&gt;&lt;/assemblies&gt;&lt;/pre&gt;I will talk on this again later with more details.&lt;br /&gt;&lt;br /&gt;2. Ajax Control Tool Kit Reorder List is not working on IE 8 Browser.I saw most of peoples' solution was install the New version of the toolkit.But you must install the new update of the IE8 browser too.There was a big issue with this control.That was reorder list can not reorder.&lt;br /&gt;&lt;br /&gt;3.There is a common toolbox error when we are publishing the project solution.I saw there were lot of answers this and nobody gave a solution.Do not go to change the coding.Just delete the reference and restore the Ajax control toolkit to the tool box.It is working perfectly.&lt;br /&gt;&lt;br /&gt;4.As you know Ajax is running on java scripts.There is an another amazing technique called Jquery which is running on java script.But there is a conflict when we are using both J query with Ajax.I saw this has come with J query light box.The reason was both Java scripts had used same variable names inside their coding.You should find the same variable names and change in J query scripts.That was the solution.Before it was giving java script errors with wrong line numbers.That is strange.&lt;br /&gt;&lt;br /&gt;Solutions are seems to be easy.But Problems were wasting time of most of the people.That is why I thought to collect them in to one place and give it to you.&lt;br /&gt;&lt;br /&gt;Do not forget to keep here your feedback.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-392740553691781763?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/392740553691781763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-issues-with-net-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/392740553691781763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/392740553691781763'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/ajax-issues-with-net-framework.html' title='Ajax Issues with .NET Framework'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-4497824727861645695</id><published>2009-08-06T12:26:00.000+05:30</published><updated>2009-08-06T12:30:55.461+05:30</updated><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Technical Issues and Solutions'/><title type='text'>Microsoft Technical Issues</title><content type='html'>This blog is dedicated to discuss technical issues and solutions in Microsoft technologies.You can post your found solutions and issue via this blog.More articles in the future.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-4497824727861645695?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/4497824727861645695/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/microsoft-technical-issues.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/4497824727861645695'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/4497824727861645695'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2009/08/microsoft-technical-issues.html' title='Microsoft Technical Issues'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8150937948162271377.post-7166972425357465586</id><published>2008-05-07T11:40:00.000+05:30</published><updated>2009-08-06T11:46:21.957+05:30</updated><title type='text'>Welcome to my Blog</title><content type='html'>Welcome to all&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8150937948162271377-7166972425357465586?l=prasadmaduranga.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://prasadmaduranga.blogspot.com/feeds/7166972425357465586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://prasadmaduranga.blogspot.com/2008/05/wlcome-to-my-blog.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7166972425357465586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8150937948162271377/posts/default/7166972425357465586'/><link rel='alternate' type='text/html' href='http://prasadmaduranga.blogspot.com/2008/05/wlcome-to-my-blog.html' title='Welcome to my Blog'/><author><name>Prasad Maduranga</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
