Wednesday, 28 June 2017

SQL Server - HTML to TEXT

CREATE FUNCTION [dbo].[HTMLtoText] (@HTMLText VARCHAR(MAX))
RETURNS VARCHAR(MAX) AS

BEGIN
DECLARE @Start INT
DECLARE @End INT
DECLARE @Length INT
SET @Start = CHARINDEX('<',@HTMLText) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText)) 
SET @Length = (@End - @Start) + 1 WHILE @Start > 0
AND @End > 0
AND @Length > 0
BEGIN
SET @HTMLText = STUFF(@HTMLText,@Start,@Length,'')
SET @Start = CHARINDEX('<',@HTMLText) SET @End = CHARINDEX('>',@HTMLText,CHARINDEX('<',@HTMLText))
SET @Length = (@End - @Start) + 1
END
  RETURN LTRIM(RTRIM(@HTMLText))
END
GO

Command to Test:
SELECT dbo.HTMLtoText('<h1>Everything is possible, nothing is <span style="color: red"><b>impossible.</b> </span>:)</h1>')


Tuesday, 27 June 2017

C# ASP.NET Rich Text Box/Editor

The most-used free ASP.NET WYSIWYG HTML editor featured in open source and commercial projects more...


Friday, 26 May 2017

Register ASP.NET 4.x

Dialog box may be displayed to users when opening projects in Microsoft Visual Studio after installation of Microsoft .NET Framework 4.6 more...


Sunday, 30 April 2017

Calling ASP.Net Code Behind using jQuery AJAX

Ajax (Asynchronous Javascript and XML) is a technique of sending the request and receiving the response from the server without reloading the entire page. To avoid PostBack call in C# ASP .Net, we can use jQuery Ajax to call code behind more…


Friday, 7 April 2017

How to Reset Your Forgotten Windows Password the Easy Way

Forgetting Windows password is never any fun, but there’s a easy way to reset the password. All you need to do is to follow the below steps: 
  1. Boot your PC from Windows disk
  2. Select the "Repair Your Computer"
    image
  3. Go to "Command Prompt"
    image
  4. Backup the original sticky keys file: 
    copy c:\windows\system32\sethc.exe c:\
  5. Copy the command prompt executable (cmd.exe) over top of the sticky keys executable
    copy c:\windows\system32\cmd.exe c:\windows\system32\sethc.exeimage
  6. Restart the PC
  7. Once you get to the login screen, hit the Shift key 5 times, and you’ll see an administrator mode command promptimage
  8. Use the following command, replacing the username and password with the combination you want to reset the user password:
    net user geek <NewPassword>
    image
  9. Put the original sethc.exe file back, which you can do by rebooting into the installation CD, opening the command prompt, and copying the c:\sethc.exe file back to
    c:\windows\system32\sethc.exe

  • NOTE: If the local account is not exist, issue the following commands to create it:
    net user <username> /add
    net 
    localgroup administrators <username> /add

Thursday, 9 March 2017

Monday, 6 March 2017

ASP.NET 4.5 Web Forms Code Generator

Generate ASP.NET 4.5 Web Forms, Middle-Tier, Data-Tier, and Stored Procedures (or Dynamic SQL) in One Click*. AspxFormsGen 4.5 generates databound ASP.NET 4.5 web forms. AspxFormsGen 4.5 is a combination of our AspxFormsGen 4.5 engine (generates ASP.NET web forms) and AspxCodeGen 4.5 engine which generates Middle-Tier, Data-Tier, and Stored procedures or Dynamic SQL codes more...


Analysis Service in Power BI Report Server

 We couldn’t connect to the Analysis Services server. Make sure you’ve entered the connection string correctly... link