Skip to main content

Posts

Adminlte Tabs reset on DNN post back

Dear All, I worked with Admin Lte tabs and i found when the form has submitted than the respective fist tab will be selected always. As a result the user focus will be out. here is a solution for it Add the following code in ascx control file <script type="text/javascript">     $(function () {         var tabName = $("[id*=TabName]").val() != "" ? $("[id*=TabName]").val() : "tab_1";         $('#Tabs a[href="#' + tabName + '"]').tab('show');         $("#Tabs a").click(function () {             $("[id*=TabName]").val($(this).attr("href").replace("#", ""));         });     }); </script> <asp:HiddenField ID="TabName" runat="server" /> Following code will be added on the code behind TabName.Value = Request.Form[TabName.UniqueID]; I hope it resolve your issue as well Regards Rashid Imran Bilgrami ...

Force Visual Studio to always run as an Administrator in Windows 8

Dear All It's a small issues for developer but a headache for every time during development once vs stop and ask for restart with different user credential here is a solution for it  Please follow the below step to make your VS run with administrator In Windows 8, you have to right-click devenv.exe and select "Troubleshoot compatibility". select "Troubleshoot program" check "The program requires additional permissions" click "Next", click "Test the program..." wait for the program to launch click "Next" select "Yes, save these settings for this program" click "Close" I hope it resolve your problem  Regards Rashid Imran Bilgrami 

SQL DB Stuck during Take Offline

Dear All, If your database Take offline process has stuck then don't worry just follow the below steps and you will make your database offline: Steps 1) Run the following command EXEC sp_who2 2) List down the SPID # run again your database column (DBNAME) 3) kill the process... 4) Once you kill all the processes then run the following command ALTER DATABASE [myDB] SET OFFLINE WITH ROLLBACK IMMEDIATE After that your datbase goes offline, now  you will make a copy for it There is another process if you have many process runing to gather you can use below query DECLARE @DatabaseName nvarchar(50) SET @DatabaseName = N'Write your database name' DECLARE @SQL varchar(max) SET @SQL = '' SELECT @SQL = @SQL + 'Kill ' + Convert(varchar, SPId) + ';' FROM MASTER..SysProcesses WHERE DBId = DB_ID(@DatabaseName) AND SPId <> @@SPId EXEC(@SQL) ALTER DATABASE [Write your database name] SET OFFLINE WITH ROLLBACK IMMEDIATE GO Regard...

Encrypt Web.config in DNN or ASP.net web application

Granting Read Access to an RSA Encryption Key Step 1: Go to the appropriate framework directory for the ASP.NET files:cd C:\Windows\Microsoft.NET\Framework64\v4.0.30319 Step 2: From here we can grant read access to an RSA encryption key by running this command:.\aspnet_regiis.exe -pa "NetFrameworkConfigurationKey" "IIS APPPOOL\MySite" How to Identify the APP  Pool "IIS APPPOOL\MySite" is the identity that my App Pool runs under. If you don't know what yours is, create an .aspx file in your website with the following content: <%@ Page Language="C#" %>  <% Response.Write(System.Security.Principal.WindowsIdentity.GetCurrent().Name); %> Encrypting Sections of the Web.config File At this point, we are ready to run the command that will actually encrypt the web.config.  MAKE SURE THAT YOU HAVE A BACKUP OF ALL THE DATA STORED IN THE SECTION YOU ARE ABOUT THE ENCRYPT. .\aspnet_regiis.exe -pe "connectionStr...

How to get DNN user profile pic in your custom Module

How to get your user profile pic in DNN module here is the code  protected void Page_Load(object sender, EventArgs e)         {                       PortalModuleBase myportalInfo = new PortalModuleBase();             Literal1.Text = myportalInfo.UserInfo.Profile.PhotoURL;                   } I hope it helps you and save your time Regards Rashid Imran Bilgrami http://www.bestvisualization.com

DNN:Text return Nothing or Skin Token is not working with DNN:Text

Dear All,  Today i found a  problem when i render the DNN skin object with DNN:Text then it will return nothing, i register the object <%@ Register TagPrefix="dnn" TagName="TEXT" Src="~/Admin/Skins/Text.ascx" %> then i place the DNN text object with token <dnn:TEXT runat="server" id="TEXT1" Text="[Tab:TabName]" CssClass="NormalBold" ReplaceTokens="True" /> but there is no luck then i found when the ascx.cs file and checked out the code in detail and i found the variable that use in the cs file is ShowText instead of Text.  Here if you did not get the return value from dnn:Text in dnn 7.3 version then use the following skin object  <dnn:Text runat="server" id="CheckingOne2" ShowText="[User:FullName]" ReplaceTokens="True"/> Note in above like there is ShowText instead of Text  I hope it save your time because it already eat my ...