Tuesday, May 27, 2008

Windows Commands undocumented

System Configuration Utility  (can use to control starup programs)
msconfig

System Configuration Editor
sysedit

Direct X Troubleshooter (Diagnose & test DirectX, video & sound cards)
dxdiag

System Information
msinfo32

Volume Control
sndvol32

Task Manager
taskmgr

Administrative Tools
control admintools

User Accounts
control userpasswords2
control userpasswords

Folders Properties
control folders

Display Properties
control desktop
control color      (w/Appearance Tab Preselected)

Mouse Properties
control mouse

Network Connections
control netconnections

Keyboard Properties
control keyboard

Printers and Faxes
control printers

Fonts
control fonts

Scheduled Tasks
control schedtasks

Component Services
dcomcnfg

Internet Information Server
inetmgr

Remote Desktop 
mstsc

Performance Monitor
perfmon

Disk Partition Manager
diskpart

ODBC Data Source Administrator 
odbcad32

Network shared folder wizard (creates shared folders on network)
shrpubw

Performance Monitor
perfmon.msc

Disk Management
diskmgmt.msc

Computer Management
compmgmt.msc

Event Viewer
eventvwr.msc

Device Manager
devmgmt.msc

Services
services.msc 

Windows Management Infrastructure(Windows Management Instrumentation)
wmimgmt.msc

Resultant Set of Policy (XP Prof)
rsop.msc

Group Policy Editor (XP Prof)
gpedit.msc

Local Security Settings
secpol.msc

Local Users and Groups
lusrmgr.msc

Shared Folders
fsmgmt.msc

Indexing Service
ciadv.msc

Removable Storage
ntmsmgr.msc

Removable Storage Operator Requests
ntmsoprq.msc

Certificate Manager
certmgr.msc

Disk Defragment
dfrg.msc

Windows Explorer
explorer.scf

Windows Explorer
explorer

Internet Explorer
iexplore

Private Character Editor (allows creation or modification of characters)
eudcedit

Character Map
charmap

Clipboard Viewer (views contents of Windows clipboard)
clipbrd

Disk Cleanup 
cleanmgr

Dr. Watson System Troubleshooting Utility
drwtsn32

SQL Client Configuration
cliconfg

DDE Shares
ddeshare

Iexpress Wizard (Create self-extracting / self-installing package)
iexpress

Object Packager 
packager

Program Manager (Legacy Windows 3.x desktop shell)
progman

Remote Access phone book 
rasphone

Mcft Synchronization Manager 
mobsync

File Signature Verification Tool
sigverif

Driver Verifier Utility
verifier

Logs You Out Of Windows
logoff

Shuts Down Windows
shutdown

Check Disk Utility
chkdsk

Command Prompt
cmd

Registry Editor
regedit

Registry Editor (Don't work on XP Prof)
regedit32

Display Properties
desk.cpl

Internet Properties
inetcpl.cpl

Sounds and Audio
mmsys.cpl

System Properties
sysdm.cpl

User Account Management
nusrmgr.cpl

Mouse Properties
main.cpl

Network Connections
ncpa.cpl

ODBC Data Source Administrator
odbccp32.cpl

Accessibility Controls
access.cpl

Add Hardware Wizard
hdwwiz.cpl

Add/Remove Programs
appwiz.cpl

Phone and Modem Options
telephon.cpl

Power Configuration
powercfg.cpl

Scanners and Cameras
sticpl.cpl

Game Controllers
joy.cpl

Findfast
findfast.cpl

Regional Settings
intl.cpl

Phone and Modem Options
telephon.cpl

Power Configuration
powercfg.cpl

Date and Time Properties
timedate.cpl

Automatic Updates
wuaucpl.cpl

Windows Firewall (Not working on my system)
firewall.cpl

Security Center (Not working on my system)
wscui.cpl

Network Setup Wizard (Not working on my system)
netsetup.cpl

Password Properties (Not working on my system)
password.cpl

Printers Folder
printers

Telnet Client
telnet

Utility Manager
utilman

Windows System Security Tool
syskey

Windows Update Launches
wupdmgr

m*cro$oft Chat
winchat

Windows XP Tour Wizard
tourstart

Windows Magnifier
magnify

On Screen Keyboard
osk

Fonts Folder
fonts

Notepad 
notepad

Wordpad
wordpad

Calculator
calc

Windows Media Player 5.1 (Retro version of Media Player, very basic)
mplay32

Bluetooth Transfer Wizard (Not working on my system)
fsquirt


IP Configuration
============
ipconfig /all # IP Configuration (Display Connection Configuration)
ipconfig /displaydns # IP Configuration (Display DNS Cache Contents)
ipconfig /flushdns # IP Configuration (Delete DNS Cache Contents)
ipconfig /release # IP Configuration (Release All Connections)
ipconfig /renew # IP Configuration (Renew All Connections)
ipconfig /registerdns # IP Configuration (Refreshes DHCP & Re-Registers DNS)
ipconfig /showclassid # IP Configuration (Display DHCP Class ID)
ipconfig /setclassid # IP Configuration (Modifies DHCP Class ID) 

System File Checker Utility
===================
sfc /scannow # System File Checker Utility (Scan Immediately) 
sfc /scanonce # System File Checker Utility (Scan Once At Next Boot) 
sfc /scanboot # System File Checker Utility (Scan On Every Boot) 
sfc /revert # System File Checker Utility (Return to Default Setting) 
sfc /purgecache # System File Checker Utility (Purge File Cache) 
sfc /cachesize=x # System File Checker Utility (Set Cache Size to size x)

Windows Games
============
Hearts Card Game
mshearts

Free Cell Card Game
freecell

Minesweeper Game
winmine

Spider Solitare Card Game
spider

If Installed 
========
Direct X Control Panel (If Installed)*
directx.cpl

Java Control Panel 
javaws

Quicktime 
QuickTime.cpl

Opens AC3 Filter 
ac3filter.cpl

Nview Desktop Manager 
nvtuicpl.cpl

Java Control Panel 
jpicpl32.cpl

Microsoft Access
msaccess

Power Point
powerpnt

Microsoft Word
winword

Microsoft Excel
excel

FrontPage
frontpg

Adobe Acrobat Reader 6.0
acrord32

Adobe Illustrator
Illustrator

Adobe Photoshop cs 8.0
photoshop

Adobe ImageReady 8.0
imageready

MacroMedia Flash 8
flash

CloneCD v4.2
clonecd

CloneDVD v2
clonedvd2

Nero Smart
nerostartsmart

Nero Burning Rom
nero

Image Drive
imagedrive

Nero Vision
nerovision

Nero Player (Show Time)
showtime

Nero Media Player
neromediaplayer

JetAudio Player 6
jetaudio

Realplayer 
realplay

Visual C++
MSDEV

WinRAR
winrar

Mozilla FireFox Internet Explorer
firefox

AVG AntiVirus 7.0
avgw

Special Commands
=============
Runas

example:
runas /user:localmachinenameadministrator cmd
To start an instance of the command prompt as an administrator on the local computer

MicroSoft Mangement Console (.msc)       
msc may means MicroSoft Console    
mmc.exe MMCMainFrame

Network connections
control.exe netconnections

Command Base Utility : 
REXEC (Remote Execution) , RSH (Remote Shell) and Telnet

Transfer Utilities : FTP , RCP, TFTP
Printer Utilities : LPR, LPQ

Windows Movie Maker
moviemk

Windows Messenger
msmsgs

Microsoft Outlook Express
msimn

NetMetting
conf

Tuesday, May 20, 2008

Adding Radio Button to GridView

First add a literal control as shown below and in GridView1_RowCreated event which will run for every row. assign the text value of literal control. and u can add as many attributes u want in radio button.make one thing very clear that u can use web control or html server control because they are server control and when your gridview rendered it generate there own unique id and name. when you want to change the value or their status like checked/unchecked use Literal lc = (Literal)e.Row.FindControl("Literal1"); and change the text of literal control based on your requirement. where e is GridViewRowEventArgs you will get it in any gridview specific event like click etc.

<asp:GridView ID="GridView1" runat="server">

<asp:TemplateField HeaderText="Radio"> <ItemTemplate>

<asp:Literal ID="Literal1" runat="server"></asp:Literal>

</ItemTemplate>

</asp:TemplateField>

</asp:GridView>

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)

{

if (e.Row.RowType == DataControlRowType.DataRow)

{

Literal lc = (Literal)e.Row.FindControl("Literal1");

lc.Text = lc.Text = String.Format("<input type='radio'

name='radiogroup' id=" + e.Row.RowIndex);

if (e.Row.RowIndex == 0)

lc.Text = lc.Text + " checked='checked'";

lc.Text = lc.Text + "/>";

}

}

Monday, May 19, 2008

Detecting async postback start & end

When you use the UpdatePanel control you probably also want to display some kind of progress bar to the user so they can see when the async. postback starts and when it's done, at least something that indicate that some work are being done and they need to wait until it's done. This can be done by using the UpdateProgress control shipped with ASP.Net Ajax 1.0 Extension. If you use the UpdatePanel control and specify an AsyncPostBackTrigger and also associate the UpdateProgress to an UpdatePanel, the UpdateProgress control will not be displayed.Below is the solution



<%@ Page Language="C#" AutoEventWireup="true"
CodeFile="PleaseWait.aspx.cs"
Inherits="GridViewasInsert" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/
xhtml1-transitional.dtd"
>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">


<asp:ScriptManager ID="s" runat="server">

</asp:ScriptManager>
<div>
<asp:Button ID="Button1" runat="server"
Text="AA" OnClick="Button1_Click" />


<asp:UpdatePanel ID="UpdatePanel1"
runat
="server">

<ContentTemplate>
gfdgdg
</ContentTemplate>

<Triggers>
<asp:AsyncPostBackTrigger
ControlID="Button1"
EventName="Click" />
</Triggers>
</asp:UpdatePanel>

<asp:UpdateProgress
AssociatedUpdatePanelID="UpdatePanel1"
ID
="UpdateProgress1" runat="server">
<ProgressTemplate>
Please wait, update in progress
</ProgressTemplate>
</asp:UpdateProgress>
</div>
</form>


<script language="javascript" type="text/javascript">

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);
var postBackElement;

function InitializeRequest(sender, args)
{
if (prm.get_isInAsyncPostBack())
args.set_cancel(true);
postBackElement = args.get_postBackElement();

if (postBackElement.id == 'Button1')
$get('UpdateProgress1').style.display = 'block';
}
function EndRequest(sender, args)
{
if (postBackElement.id == 'Button1')
$get('UpdateProgress1').style.display = 'none';
}
</script>

</body>
</html>

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class GridViewasInsert
: System.Web.UI.Page
{
protected void Page_Load(object sender,
EventArgs e)
{
//Replace This when using on live server
System.Threading.Thread.Sleep(3000);

}
protected void Button1_Click(object sender,
EventArgs e)
{
Response.Redirect("AnotherPage.aspx");
}
}

Sunday, May 18, 2008

About ToogleBase

Welcome to Tooglebase.blogger.com

Hope this blog is going to help you all