Thursday, May 26, 2011

ASP.NET Web Sites for Mobile Devices 4.0 , visual studio 2010

Developing ASP.NET pages for mobile device browsers does not differ substantially from developing pages for desktop browsers. To help you create applications for mobile devices, ASP.NET provides a System.Web.Mobile namespace devoted specifically to mobile Web development.

You can create a Web page from the MobilePage base class and add controls from the System.Web.Mobile namespace. This namespace defines a suite of Web server controls and adapters that are especially useful when creating applications that need to be available to many different mobile devices, such as cell phones.

ASP.NET also provides a control-adaptive architecture that allows custom device adapters to be created for ASP.NET Web server controls. The adapters can create custom rendering for a control based on the requesting browser. With the adaptive architecture, you can create custom adapters for ASP.NET Web server controls to render output specific to the devices that access your application on desktop browsers.

Whether developing for desktop browsers or mobile devices, development follows the standard .NET event-driven model in which your application responds to user requests, button clicks, and so on.

http://msdn.microsoft.com/en-us/library/ms178619.aspx#MobileApplicationArchitecture


Sunday, January 16, 2011

How to uninstall deep freeze - defreeze.exe

To uninstall the software Deep Freeze must first be disabled and then uninstalled.
To disable Deep Freeze:

  1. Hold down the shift key and double-click on the Deep Freeze icon. Alternatively, you can press Crtl-Alt-Shift-F6. You should now see a password dialog.
  2. Enter your password and click OK. If you have not yet entered a password you should be able to click OK without entering anything. You should now see a dialog with boot options.
  3. Select "Boot thawed" and click OK. This will disable Deep Freeze on the next reboot.
  4. Reboot your machine. After the machine reboots you are ready to uninstall Deep Freeze.
To uninstall:
  1. Locate the installation file you used to install Deep Freeze to this machine. By default the name of this file is called "DF5Std.exe" for versions 5.X and "DF6Std.exe" for versions 6.X.
  2. Run the installation file (DF5Std.exe or DF6Std.exe).
  3. Select the option to "Uninstall"
  4. The software should uninstall and reboot the machine. When the machine reboots, Deep Freeze should be uninstalled.

Wednesday, June 18, 2008

SqlDataadapter

//*** don't run more than once ***
String selectCommand = "SELECT EmployeeID FROM Employees";
SqlConnection conn = new SqlConnection(ConfigurationSettings.AppSettings["Sql_ConnectString"]);
SqlDataAdapter da = new SqlDataAdapter(selectCommand, conn);

DataTable table = new DataTable("Employees");
da.FillSchema(table, SchemaType.Source);
da.Fill(table);

conn.Open();
foreach(DataRow row in table.Rows)
{
Int32 employeeId = (Int32)row["EmployeeID"];

String sqlRead = "SELECT Photo FROM Employees WHERE EmployeeID=" + employeeId;
SqlCommand cmdRead = new SqlCommand(sqlRead, conn);

MemoryStream ms = new MemoryStream();
Byte[] image = (Byte[])cmdRead.ExecuteScalar();
ms.Write(image, MSACCESSIMAGEOFFSET, image.Length - MSACCESSIMAGEOFFSET);

String sqlWrite = "UPDATE Employees SET Photo = @Photo WHERE EmployeeID=" + employeeId;
SqlCommand cmdWrite = new SqlCommand(sqlWrite, conn);

//Create parameter for insert command and add to SqlCommand object.
SqlParameter prm = new SqlParameter("@Photo", SqlDbType.VarBinary, ms.ToArray().Length, ParameterDirection.Input, false,
0, 0, null, DataRowVersion.Current, ms.ToArray());
cmdWrite.Parameters.Add(prm);

//Execute query.
cmdWrite.ExecuteNonQuery();
}
conn.Close();
}
}

Query String

Response.Redirect("Welcomepage.aspx?Name=Zam&place=kerala");


Response.Write("My details " +"Name :" +Request.QueryString["Name"]+" "+"Place :"+Request.QueryString["place"]);
Response.Write("Hello" + Request.QueryString["Name"]);

session
------
Session["Name"] = "World hello ";

Response.Redirect("WebForm3.aspx");
2nd page
Response.Write("Name::::" + Session["Name"]);

Tuesday, June 10, 2008

System.Diagnostics.Process.Start

StreamWriter sw;
private void button1_Click(object sender, EventArgs e)
{
sw = File.CreateText("C:\\Zm1.html");
sw.WriteLine("HTML>HEAD>TITLE>/TITLE>/HEAD>");
sw.WriteLine("BODY>H1>HELLO/H1>/BODY>");
sw.WriteLine("/HTML>");
sw.Close();
}

private void button2_Click(object sender, EventArgs e)
{

System.Diagnostics.Process.Start("iexplore", "C:\\Zm1.html");
}
}

Friday, June 6, 2008

deepZoom key strock

public partial class Page : UserControl
{
Point _currentMousePosition = new Point();
public Page()
{
InitializeComponent();
initializeEvents();
}
private void initializeEvents()
{
this.MouseMove += new MouseEventHandler(Page_MouseMove);
this.KeyDown += new KeyEventHandler(Page_KeyDown);
}
void Page_KeyDown(object sender, KeyEventArgs e)
{
if (e.Key == Key.W) // zoom in
Zoom(1.2f, _currentMousePosition);
if (e.Key == Key.S) // zoom out
Zoom(0.8f, _currentMousePosition);
}
void Page_MouseMove(object sender, MouseEventArgs e)
{
_currentMousePosition = e.GetPosition(this);
}
private void Zoom(double zoomFactor, Point pointToZoom)
{
Point logicalPoint = dzo.ElementToLogicalPoint(pointToZoom);
dzo.ZoomAboutLogicalPoint(zoomFactor, logicalPoint.X, logicalPoint.Y);
}





}
}

Monday, June 2, 2008

ASP.NET AJAX Extensions 1.0

One of the excellent features of ASP.NET AJAX Extensions 1.0 is the UpdatePanel control. The UpdatePanel control enables partial-page rendering in an ASP.NET Web page asynchronously. The contents of the UpdatePanel control will automatically update when a postback event is invoked. This control does work the same as the MagicAjax.net panel control. The UpdateProgress control is very useful when working with the UpdatePanel control. With an UpdateProgress control, you can show the status during the partial-page rendering of an UpdatePanel