Tuesday, November 25, 2014

To customize Bootstrap

By going to this site http://getbootstrap.com/customize/ We can customize the bootstrap by selecting the
Less files like

Common CSS


Components


JavaScript components


Thursday, June 21, 2012

To comment a line in Razor

To comment a line in Razor file .cshtml
use


@*  Hi this is comment section *@



<!-- Comment in Aspx page --> Wont work in Razor files



Friday, June 8, 2012

SSRS SQL server 2008 R2 Error Message


User does not have required permissions. Verify that sufficient permissions have been granted and Windows User Account 


Control (UAC) restrictions have been addressed. 

First time when you are configuring SQL server 2008 /R2 repoting server through Business Intelligence and try to access the server URL it throws this error message.

If you are not logged in as administrator it will throw this message.
Workaround:
Goto Internet Explorer (Run as admininstrator) enter the report server URL
http://"server name"/Reports"report server instance"/Pages/Folder.aspx
Enter the administrator credentials with domain name.
GOTO 
1) Folder settings->New role assignment
2) Add the user name which is in the Domain to view the reports.

Now you can access the report URL with your credentials without administrator credentials.

Friday, February 10, 2012

To check column name in a database

If you know column name but to find out which table has that
Do this:
Select Name from sysobjects where id in (select id from syscolumns where name like '%userid%')

Wednesday, May 11, 2011

Telerik Error Creating Control

Error Creating Control ....
PublicKeyToken=121fae78165ba3d4'

On visual studio if you are not able to view the Telerik controls and if it shows the above follow these steps

1) Copy Telerik.Web.design.dll to the Bin folder of your application. No need to add a reference to the web application just copy it.
2) Search ProjectAssemblies folder under C:\Documents and settings\\ and delete the folder or If Vista or Win7 search it under c:\Users\
3) Restart Visual studio

Thursday, February 24, 2011

RadtreeView Nodes Font size Font size increases when Expanding

When you click on the expand button to view the child nodes the font of the child nodes are increased for each node. And you dont want to display in the increasing order and everythign should be in xx-small,
Ex:
Root(xx-small)
- Child1(x-small)
-Child1-1(Small)
- child1-1-1(Medium)


< style="FONT-SIZE: xx-small">
< id="rtvTreeView" runat="server" checkboxes="true" size="XX-Small" onnodeexpand="rtvTreeView_NodeExpand" enabledraganddrop="True" enabledraganddropbetweennodes="True" onnodedrop="rtvTreeView_NodeDrop">
< type="InQuint" duration="100">< /collapseanimation>
< type="None" duration="100">< /expandanimation>
< /telerik:radtreeview>
< /div>

Even if you give the Font-size XX-small in div or inside the telerik :radtreeview tag it wont take it.So assignt the Font size before binding to the each node.

Telerik.Web.UI.RadTreeNode subnode = new Telerik.Web.UI.RadTreeNode(fullname, userid.ToString());
subnode.Attributes.Add("nodetype", "user");
subnode.ExpandMode = Telerik.Web.UI.TreeNodeExpandMode.ServerSideCallBack;
subnode.Checkable = false;
subnode.Font.Size= FontUnit.xx-small;
parentnode.Nodes.Add(subnode);

Monday, October 11, 2010

Ltrim Rtrim not working

In Sql server when you find ltrim and rtrim is not working.Then it must be some ascii characters added to it.
You can find the ascii characters

DECLARE @Val VARCHAR(50)
DECLARE @i INT

SET @Val = 'Pastehere '
SET @i = 0

WHILE @i <= DATALENGTH(@Val)
BEGIN
PRINT SUBSTRING(@Val, @i, 1) + ' : ' + CAST(ASCII(SUBSTRING(@Val, @i, 1)) AS VARCHAR(3))
SET @i = @i + 1
END

Once you find the ascii characters replace it with space '' or char(32)
update REPLACE(City,CHAR(160),''),City from tblAddress where id=140
Then
Trim it
update ltrim(rtrim(City))from tblAddress where id=140