Skip to main content

Posts

Showing posts from 2013

How to Add Secured File On DNN

Dear All If you want to upload any image, PDF or any other file in DNN as secured file and you want it will be accessible to  specific Group, member or any register member then follow the below steps : 1) Login to your host 2) Go to File Manager 3) Select the Folder type "Secured" instead of standard 4) Press on Create folder button After Folder creation apply the permission through bottom permission window Regards Rashid Imran Bilgrami http://www.bestvisualization.com

Adding Awesome Calender in Dotnetnuke or DNN Module

Dear Readers Today i found the very easy solution for display calender in DNN module by two easy steps DotNetNuke provides with inbuilt jquery.js and jquery-ui.js so you don't have to bother to link them separately In regular html / asp.net application you would have to add following lines in <head> tag <script src="http://code.jquery.com/jquery-1.8.2.js"></script>   <script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script>   <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" /> Note: If you did not see the calender then copy and past the above link  If you are developing a custom DNN module add this to your user control view.ascx file. I have txtStartDate as a text field on the form where I wanted my calander to be rendered on click. To achieve this I added this code at the top of my ascx page after the standard includes. <script type="

Allow Anonymous Authentication at website through IP Address or Computer Name

Dear All, Today i resolved an issue which is very basis but the solution is little bit tricky. The problem was related to accessing the website on LAN through IP or the domain name by anonymous user. I setup the site through IIS and run it on local host, the website runs perfectly. But when I tried to access the same website through IP Address  or Domain Name it's prompting the user name and password. I do the following steps but i did not get any success  1) Open the site property in IIS through website property and allow anonymous access Result the website still ask me user name and password 2) Open the web.config and add the following code   <authorization>         <allow users="*"/> //Allow everyone       </authorization> Result the website still ask me user name and password 3)  I made the the directory permission on every one and IIS user Result the website still ask me user name and password 4)  I change the IIS_USER to Administ

How to run python on IIS 7 Tested version

Dear Reader Today i run the paython on IIS 7 it's not a big issue but i did one mistake that waste my whole week and i don't want that you waste your time on it so i am sharing the video its 100% workable for me Regards Rashid Imran Bilgrami http://www.bestvisualization.com

ACII Shapes For HTML

Dear Readers; If you are looking for using the shapes icons in HTML format then  http://www.chaos.org.uk/~eddy/bits/chars.html  is the best place for you I hope it helps you Regards Rashid Imran Bilgrami www.bestvisualization.com

Drop Shadow With CSS For All Web Browsers

Dear Readers I found an article for drop shadow supported in all browsers Ref URL:  http://robertnyman.com/2010/03/16/drop-shadow-with-css-for-all-web-browsers/ One of the most common CSS effects is using shadows in various ways. Before, we needed to resort to images, but now we can offer this to all major web browser with CSS! Web Browser Support Believe me or not, but all of these web browsers we can offer shadows with CSS: Firefox 3.5+ Safari 3+ Google Chrome Opera 10.50 Internet Explorer 5.5 The Standards Way As we all know, a majority of the web browsers implement features in a standardized way, while others don’t (although they are getting better at it). Previously, in the W3C specification CSS Backgrounds and Borders Module Level 3 box-shadow was described, although at the moment, it’s not in there for some things to be discussed further. Anyway, this is how the implementation looks: .shadow { box-shadow: 3px 3px 4px #000; } The first value describe

How to modify the page title with respect of your module in Dotnetnuke or DNN

Dear Readers This is actually a very simple trick to do inside of your modules, though you might need to setup an option to allow this to be turned on or off depending on what the site administrator wants the page title to be. In C# you can use the following code DotNetNuke.Framework.CDefault tp = (DotNetNuke.Framework.CDefault)this.Page; tp.Title = "This is my page title"; So the next time you're coding a module and need to change the page title, it's that simple. Regrads Rashid Imran Bilgrami http://www.bestvisualization.com

DNN content Localization with front end control

Dear All It's very small but it save time instead of setting the localization value all the time from the code behind, by using this code you can control it with the front end controller <asp:Button ID="Button2" runat="server" resourcekey="PrintButton.text"/> Here resourcekey is use for localization and printbutton.text is define under the resx file I hope it helps you for saving the time Regards Rashid Imran Bilgrami http://www.bestvisualization.com

Missing xml comment for publicly visible c# (Solved)

Dear All, If you are facing the warning " Missing xml comment for publicly visible c# " then you just need to do following steps Open you c# project propoerty Click on Build tab Under output section uncheck the xml documentation  file The problem will be resolved Regards Rashid Bilgrami http://www.bestvisualization.com 

DNN 7 Won't go into edit mode or not working with control bar

Dear All, Today when i install the DNN 7 then i found and issue in edit mode after installation. The problem is when i go to edit mode the page refresh with out enabling the edit mode, after a short research on Google i found the solution. I hppe it save your time 1. backup your web.config 2. Open your web.config in a text editor 3. within the web.config file, find the <system.webserver><modules> section. 4.  If the <modules> section says <modules runAllManagedModulesForAllRequests="false"> change it to <modules runAllManagedModulesForAllRequests="true"> OR  if it just says <modules>, change it to <modules runAllManagedModulesForAllRequests="true"> 5. Save the config file. 6. Retry by refreshing the page and trying again.  You can also test this out by trying to a do a journal post (which also uses the services framework in an authenticated way. If some how its will not work then, you must chang

Javascript not working when enable the AJAX in DNN or .net

Dear All, Today i found a solution finally to rebind the Javascript issue with support partially run with DNN Here is the key <script type="text/javascript">     function BindControlEvents() {         //jQuery is wrapped in BindEvents function so it can be re-bound after each callback.         //Your code would replace the following line:             $('#<%= TextProtocolDrugInstructions.ClientID %>').limit('100', '#charsLeft_Instructions');             }     //Initial bind     $(document).ready(function () {         BindControlEvents();     });     //Re-bind for callbacks (This is a key)     var prm = Sys.WebForms.PageRequestManager.getInstance();     prm.add_endRequest(function() {         BindControlEvents();     }); </script> Regards Rashid Imran Bilgrami  http://www.bestvisualization.com

Update Panel not working after converting an application to 1.1 to 3.5

Dear Friend We have a project which was previousely in asp.net 1.1. I converted that into .net 3.5.Everything is working fine except Update Panel. We add the update panel in my form and put some controls in contenttemplate. when we click the button inside the update panel make post back so other controls out side update panel also get refresh. We tested the same code in new asp.net 3.5 website.There it is working fine.is there any issue while we convert the project The solution is very simple Open you web.config file delete this line <xhtmlConformance mode="Legacy"/> or Rename the old web.config file and create new one the problem will resolve Regards Rashid Imran Bigrami http://www.bestvisualization.com

C# Generate All Dates between starting and ending date

Dear Readers This code  will return a generic list of DateTime containing the dates between a starting date and ending date:  //Here is the function private List<DateTime> GetDateRange(DateTime StartingDate, DateTime EndingDate) {     if (StartingDate > EndingDate)     {         return null;     }     List<DateTime> rv = new List<DateTime>();     DateTime tmpDate = StartingDate;     do     {         rv.Add(tmpDate);         tmpDate = tmpDate.AddDays(1);     } while (tmpDate <= EndingDate);     return rv; } //Here you call this function DateTime StartingDate = DateTime.Parse("02/25/2007"); DateTime EndingDate = DateTime.Parse("03/06/2007"); foreach (DateTime date in GetDateRange(StartingDate,EndingDate)) {    Response.Write(date.ToShortDateString()); } And it will return as result: 2/25/2007 2/26/2007 2/27/2007 2/28/2007 3/1/2007 3/2/2007 3/3/2007 3/4/2007 3/5/2007 3/6/2007 Regards Rashid Imran Bil

Schedule Back Up Of Your SQL DB

Dear All, I hope this post save your time, If you need to make the scheduled for daily backup in SQL please follow the following steps: Steps for Generate the SQL Script for backup  1) Right click on the Database 2) Click on Task 3) Click on Backup 4) Click on the Script Button 5) Once you click you will get the script like that BACKUP DATABASE [DNNFrsh] TO DISK = N'Drive:Path\databaseName.bak' WITH NOFORMAT, NOINIT, NAME = N'databaseName-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10GO 6) Right Click on SQL Server Agent 7) Click on the New Job 8) Fill the required name and other field 9) In Step section Paste the Backup query that you generated in the above step 10) After that set the scheduled timings and save it Your schedule is ready now! Regards Rashid Imran Bilgrami http://www.bestvisualization.com

Passing more then one parameter in Datalist or Datagrid image button link

Dear Readers, Here is the code that helps you to pass more then one parameters in asp button ASPX or ASCX code  <asp:GridView ID="GridViewUserScraps" ItemStyle-VerticalAlign="Top" AutoGenerateColumns="False" Width="100%" runat="server" OnRowCommand="GridViews_RowCommand" >         <Columns>             <asp:TemplateField SortExpression="SendDate">                 <ItemTemplate>                 <asp:Button ID="btnPost" CssClass="submitButton" Text="Comment" runat="server" CommandName="Comment" CommandArgument='<%#Eval("ScrapId")+","+ Eval("UserId")%>' />                 </ItemTemplate>             </asp:TemplateField>         </Columns>     </asp:GridView> Code Behind Function   protected void GridViews_RowCommand(object sender, GridViewCommandEventArgs

Get DNN Module Tab ID or Redirect custom module to another custom module

Dear Friends Its common and easy that how to find the DNN module ID for redirecting one module to another. I am posting for those who did not have an idea how to redirect your one custom module to another through programming public int findPageTabId(string friendlyName, int portalId)         {             int intModTabID = -1;             ModuleInfo objModuleInfo = new ModuleInfo();             ModuleController objModuleContr = new ModuleController();             objModuleInfo = objModuleContr.GetModuleByDefinition(portalId, friendlyName);             intModTabID = objModuleInfo.TabID;             return intModTabID;          } on the button click or any function you can call this function with redirect option    protected void Button3_Click(object sender, EventArgs e)         {             int tabId=0;             UDF myudf = new UDF();             tabId = myudf.findPageTabId("Your module friendly Name", this.PortalId);             Response.Red