MSN Home  |  My MSN  |  Hotmail
Sign in to Windows Live ID Web Search:   
go to MSNGroups 
Groups Home  |  My Groups  |  Language  |  Help  
 
BDOTNETbdotnet@groups.msn.com 
  
What's New
  Join Now
  Messages  
  Mail Etiquette  
  Previous Events  
  Tips n Tricks[NEW]  
  JOBS  
  Software Artifacts  
  B.NET Core Group  
  Talk About This!  
  Be a Speaker  
  Suggestions  
  B.NET Library  
  B.NET Search  
  Documents  
  Certification  
  Favorites  
  Pictures  
  
  
  Tools  
 
Tips n Tricks[NEW]
Add Tips n Tricks  Edit Tips n Tricks  Delete Tips n Tricks  List View  Previous  Next 

8/24/2007 12:13 PM  Posted by Krirkjung
Write program for display hello world without semicolon
 
Click here to view source

8/23/2007 7:07 AM  Posted by MSN NicknameDheerLalitGupta
Ever wondered how to add an icon in address bar to your web site.
 

It’s as simple as adding this line in the <head> tag of your page…<o:p></o:p>

<o:p></o:p>

<LINK REL="SHORTCUT ICON" href=”youricon.ico”><o:p></o:p>


8/22/2007 9:22 AM  Posted by MSN Nicknamedumeel
A simple tip
To disable right click option on IE(Internet Explorer)
use    <BODY oncontextmenu="return false">
-Sharavanan

8/22/2007 5:36 AM  Posted by Krirkjung
 WinformThemeDesigner
 
I just upload it to planet-source-code.
you just click here to view it
 

8/15/2007 5:21 AM  Posted by Krirkjung

8/13/2007 1:32 PM  Posted by MSN NicknameBaljeetSinghIT
Office 2007 Tips 'n' Tricks

8/7/2007 8:39 AM  Posted by Krirkjung
 
I just post on my blog
 
Smart Query string.
you should use smart query string for strong type purpose.



Private ReadOnly Property CusID() As Integer
Get
If IsNothing(Me.Request.QueryString("CusID")) Then
Return 0
End If

If Not IsNumeric(Me.Request.QueryString("CusID")) Then

Return 0
End If

If CInt(Me.Request.QueryString("CusID")) > 0 Then
Return 0

End If

Return Me.Request.QueryString("CusID")

End Get


when you want to use Query string CusID you just type

me.CusID

instead

cint( Me.Request.QueryString("CusID"))

7/26/2007 3:25 PM  Posted by MSN Nicknamedumeel
A javascript to search/match any word from the dropdown
 
<html>
 <head>
 </head>
 <body>
  <br>
  <center>
   <center>
    <br>
    &nbsp;<br>
    <br>
    <table cellpadding="0" cellspacing="0" border="0" ID="Table1">
     <tr>
      <td width="200" align="center">
       <select class="TxtArea" id="MySelect1" size="6" style="WIDTH:100px" NAME="MySelect1">
        <option>Select</option>
        <option>Coca Cola</option>
        <option>Fanta</option>
        <option>Pepsi Cola</option>
        <option>X Cola</option>
       </select>
       <br>
       Filter by <input class="TxtArea" type="text" size="10" autocomplete="off" onkeyup=" f32_FillSel(this,'MySelect1');"
        ID="Text1" NAME="Text1">
       <br>
      </td>
      <td width="200" align="center">
       <select class="TxtArea" id="MySelect2" size="2" style="WIDTH:100px" NAME="MySelect2">
        <option>Select</option>
        <option>Tom</option>
        <option>Dick</option>
        <option>Harry</option>
        <option>Bert</option>
        
        <option>Saravanan</option>
        <option>Amitabh</option>
       </select>
       <br>
       Filter by <input class="TxtArea" type="text" size="10" autocomplete="off" onkeyup=" f32_FillSel(this,'MySelect2');"
        ID="Text2" NAME="Text2">
      </td>
     </tr>
    </table>
    <br>
    <script language="JavaScript" type="text/javascript">
<!--

var f32_TB,f32_ID;
function f32_InitSelectList(f32_id,axcary){
 f32_id=document.getElementById(f32_id);
 for (f32_1=0;f32_1<f32_ary.length;f32_1++){
  f32_id.options[f32_id.options.length]=new Option(f32_ary[f32_1][0],f32_ary[f32_1][1],true,true);
 }
}
function f32_FillSel(f32_tb,f32_id){
 f32_TB=f32_tb; f32_ID=f32_id;
 f32_tv=f32_tb.value.toLowerCase();
 f32_id=document.getElementById(f32_id);
 f32_tb.onkeypress=function(evt){ f32_BackSpace(evt?evt.keyCode:event.keyCode); }
 f32_tb.onblur=function(){ this.onkeypress=null; }
 if (!f32_id.ary){
  f32_id.sary=new Array();
  f32_id.ary=new Array();
  for (f32_0=0;f32_0<f32_id.options.length;f32_0++){
   f32_id.ary[f32_0]=[f32_id.options[f32_0].text,f32_id.options[f32_0].value];
  }
 }
 f32_ary=new Array();
 for (f32_0=0;f32_0<f32_id.ary.length;f32_0++){
  if (f32_id.ary[f32_0][0].toLowerCase().match( f32_tv)&&f32_tv!=''&&f32_tv!=' '){
   f32_ary[f32_ary.length]=f32_id.ary[f32_0];
  }
 }
 if (f32_ary.length<1){ f32_ary=f32_id.ary; }
 if (f32_id.sary!=f32_ary){
  f32_id.options.length=0;
  for (f32_1=0;f32_1<f32_ary.length;f32_1++){
   f32_id.options[f32_id.options.length]=new Option(f32_ary[f32_1][0],f32_ary[f32_1][1],true,true);
  }
 }
 f32_id.selectedIndex=-1;
 f32_id.sary=f32_ary;
 f32_tb.focus();
}
function f32_BackSpace(e){
 if (e==8){ f32_FillSel(f32_TB,f32_ID); }
}
//-->
    </script>
    
   </center>
  </center>
 </body>
</html>

7/26/2007 3:17 PM  Posted by MSN Nicknamedumeel
Numeric only textbox
<script language="javascript" type="text/javascript">
<!--
function intOnly(i) {
if(i.value.length>0) {
i.value = i.value.replace(/[^\d]+/g, '');
}
}
//-->
</script>

Integer Only Textbox:<br>
<input type="text" onChange="intOnly(this);"
onKeyUp="intOnly(this);" onKeyPress="intOnly(this);">

7/26/2007 3:09 PM  Posted by MSN Nicknamedumeel
A simple datagrid with add, edit, sort, delete features( which uses a stored procedure)
 
test.aspx(Part-I)
 
<%@ Page language="c#" Codebehind="test.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.test" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
 <HEAD>
  <title>test</title>
  <meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
  <meta name="CODE_LANGUAGE" Content="C#">
  <meta name="vs_defaultClientScript" content="JavaScript">
  <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
 </HEAD>
 <body MS_POSITIONING="GridLayout">
  <form id="Form1" method="post" runat="server">
   <asp:datagrid id="dg" runat="server" width="80%" CellSpacing="1" GridLines="None" CellPadding="3"
    BackColor="White" ForeColor="Black" OnPageIndexChanged="dg_Page" PageSize="10" AllowPaging="True"
    DataKeyField="eid" Font-Size="X-Small" AutoGenerateColumns="false" AllowSorting="True" Font-Names="Verdana"
    OnDeleteCommand="dg_Delete" OnItemCreated="dg_ItemCreated" OnEditCommand="dg_Edit" OnCancelCommand="dg_Cancel"
    OnUpdateCommand="dg_Update" OnItemCommand="dg_Item" OnSortCommand="dg_Sort">
    <FooterStyle backcolor="#C6C3C6"></FooterStyle>
    <HeaderStyle font-bold="True" forecolor="White" backcolor="#4A3C8C"></HeaderStyle>
    <PagerStyle horizontalalign="Right" backcolor="#C6C3C6" mode="NumericPages"></PagerStyle>
    <AlternatingItemStyle backcolor="LightSteelBlue"></AlternatingItemStyle>
    <ItemStyle backcolor="#DEDFDE"></ItemStyle>
    <Columns>
     <asp:TemplateColumn headertext="Email Status" SortExpression="EmailStatus" FooterText="Email Status">
      <ItemTemplate>
      </ItemTemplate>
     </asp:TemplateColumn>
     <asp:TemplateColumn headertext="Email Type" SortExpression="EmailType" FooterText="Email Type">
      <ItemTemplate>
      </ItemTemplate>
     </asp:TemplateColumn>
     <asp:TemplateColumn headertext="Email Content" SortExpression="Emailcontent" FooterText="Email Content">
      <ItemTemplate>
      </ItemTemplate>
     </asp:TemplateColumn>
     <asp:EditCommandColumn ButtonType="PushButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
     <asp:ButtonColumn Text="Delete" ButtonType="PushButton" CommandName="Delete" DataTextField="eid" DataTextFormatString="Delete"></asp:ButtonColumn>
    </Columns>
   </asp:datagrid><asp:button id="btnAdd" onclick="dg_Add" runat="server" Font-Size="smaller" Text="Add New"></asp:button>
  </form>
  <asp:label id="Label1" runat="server" Visible="False"></asp:label><asp:label id="Label2" runat="server" Visible="False"></asp:label><asp:label id="Label3" runat="server" Visible="True"></asp:label><br>
  <asp:label id="lblMessage" runat="server" ForeColor="Red" Font-Bold="True">Label</asp:label>
 </body>
</HTML>
============
to be continued in part-II
Notice: Microsoft has no responsibility for the content featured in this group. Click here for more info.
  Try MSN Internet Software for FREE!
    MSN Home  |  My MSN  |  Hotmail  |  Search
Feedback  |  Help  
  ©2005 Microsoft Corporation. All rights reserved.  Legal  Advertise  MSN Privacy