Monday, November 5, 2012

Suppress Warnings in XML comments (Visual Studio)

If we've checked the "XML documentation file" mark in the Visual Studio project settings, a XML file containing all XML comments is created. Additionally we'll get a lot of warnings also in designer generated files, because of the missing or wrong XML comments. While sometimes warnings helps us to improve and optimize our code but not the case all times.

Warnings

Missing XML comment for publicly visible type or member --- XML comment on --- has a param tag for "---", but there is no parameter by that name Parameter "---" has no matching param tag in the XML comment for "---"

Solution

We can suppress every warning in Visual Studio.
- In Visual Studio Right-click the the specific project / Properties / Build Tab
- Insert the following warning numbers in the "Suppress warnings": 1591,1572,1571,1573,1587,1570

Saturday, November 3, 2012

Back/Left arrow key not working on keyboard after windows 8 install

I was having an issue getting the left/back arrow key to work after installing Windows 8.   The key works neither on the metro screen, nor the desktop.  I have tried other known working keyboards as well and all have this issue.  I have also tried the keyboards on other non-windows 8 computers and they work fine.  One interesting point to note is that if you are highlighting something by holding down Shift, or Ctrl + Shift the left arrow key will work just fine for that, regardless of the keyboard.

Well for your information this issue is not in Windows 8 it arises if we start some start menu utility like I installed IObit StartMenu8. I uninstalled it and the left arrow key works fine again.
you can test it by just right click on the start menu and click on exit ant key will work fine

I recommend this https://www.pokki.com/windows-8-start-menu

I hope it helps....


Thursday, November 1, 2012

SQL Server 2008 R2 IntelliSense not working

I had the same issue, that intellisense did not work on SQL Server 2008 R2 There might be different reasons.
  • One of the reason for this behavior can be a database switched offline. When  switched all databases online, intellisense worked (after i refreshed the local cache if it is caused by this reason).
  • Another check you should check if your IntelliSense is enabled in the Query Drop down menu it'll be visible if you open a query window confirm it is enabled.
  • You should refresh you local cache from Edit menu then IntelliSense and then click on Refresh Local Cache or shortcut key is Ctrl + Shift + R
if still its not working

I hope this'll fix your problem thanks for reading...

Friday, October 19, 2012

Custome format of DateTime in WPF Data Grid


If we want to show only date and skip the time part
 
<DataGridTextColumn Header="Entry Date" Width="*" Binding="{Binding Path=DATE,StringFormat=\{0:dd.MM.yyyy \}}" >
</DataGridTextColumn >

Result is e.g. 19.10.2012

<DataGridTextColumn Header="Entry Date" Width="*" Binding="{Binding Path=DATE,StringFormat=\{0:dd.MM.yy \}}" >
</DataGridTextColumn >

Result is e.g. 19.10.12

<DataGridTextColumn Header="Entry Date" Width="*" Binding="{Binding Path=DATE,StringFormat=\{0:dd.MM.yy \}}" >
</DataGridTextColumn >

Result is e.g. 10.19.12



OR we can show only time without Date like
 

<DataGridTextColumn Header="Entry Date" Width="*" Binding="{Binding Path=DATE,StringFormat=\{0:HH.mm.ss \}}" >
</DataGridTextColumn >

Result will be like  22:19:33


Tuesday, October 9, 2012

Pass More Evals in QueryString with String.Formate



<asp:TemplateField HeaderText="EMail" SortExpression="EMail">
    <ItemTemplate> 
         <asp:HyperLink ID="hp" runat="server" 
                  CommandArgument='<%# Eval("SysID", "{0}") %>' 
       NavigateUrl='<%#  String.Format("~/ReportViewer.aspx?RevID= {0} 
      & User={1}", Eval("ID"),  Eval("USER")) %>' Target="_blank"  %>'>
</asp:HyperLink>
     </ItemTemplate>
</asp:TemplateField>




Wednesday, September 5, 2012

mailto: from HyperLink to allow the user to send emails

Hyperlink Control for mailto: to be used like this anywhere in the page
 
<asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("EMail") %>'
     NavigateUrl='<%# Eval("EMail", "mailto:{0}") %>'></asp:HyperLink>
 
HyperLinks in the GridView Row link use as Mailto:

 
<asp:TemplateField HeaderText="EMail" SortExpression="EMail">
    <ItemTemplate> 
         <asp:HyperLink ID="HyperLink1" runat="server" 
            NavigateUrl='<%# Eval("EMail", "mailto:{0}") %>' 
            Text='<%# Eval("EMail") %>'></asp:HyperLink>
     </ItemTemplate>
</asp:TemplateField>

Tuesday, July 17, 2012

Window.open from NavigateUrl Property

Window.open in Navigate Url from code behind

Make JavaScript function in HTML

function ShowPopup(url, name, width, height) {
            window.open(url, name, 'width=' + width + ',height=' + height + ',menubar=no,status=no,statusbar=no,scrollbars=1,top=150,left=400');
        }
 
C# code behind call that function 

url = "Popup.aspx?DetID" + det.ID.ToString();
nodeDet.NavigateUrl = "javascript:ShowPopup('" + url + "','Popup'," + 800 + "," + 600 + ");";

Where url is the NavigateUrl
Popup is the name of the popup
height and width is height and width of the popup.

Hyperlink Navigate Url to window.open


<asp:HyperLink ID="HyperLink1" runat="server"
      
 NavigateUrl
="javascript:window.open('http://www.google.com','Popup','statusbar=0,toolbar=0')">
asp:HyperLink>


Response.Redirect to new window


Always get the response in new window by adding an attribute target="_blank" in form tag.
When page will do post back it will automatically open response in new window
 


html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
xmlns="http://www.w3.org/1999/xhtml">
   runat="server">
        <title>title>
    head> 
    <body> 
<form id="form1" target="_blank" runat="server">

<asp:Button ID="Button1" runat="server" Text="Button" />
form>

     body>
html>

Monday, May 21, 2012

Remote desktop full screen mode short cut key

Remote desktop full screen mode short cut key is Ctrl + Alt + Pause/Break you can also change it from options here are the steps

Start "Remote Desktop Connection".
-Click on "Options".
-Click on the "Display" tab.
-On "Display configuration" settings,  change the "Remote Desktop Connection" display with slider from "Small to Large".
-By moving the "Slider" all the way to large, the display settings will automatically set to "Full Screen".

Sunday, March 18, 2012

How to refresh XSD file when change in query

Selecting "Configure" in the dataset designer.
Then in the TableAdapter configuration wizard, in select query it'll show changed columns added or deleted.
After clicking "Finish", the data tables are re-generated and refreshed.

I've checked it in VS2010.

How to refresh Tablix dataset in rdlc report

Just follow these steps
  1. Open the report
  2. Click menu item 'View', then 'Report Data'
  3. Right click the report dataset, then select 'Refresh'
you can find more details here.