Advertisements
RSS

Tag Archives: progamming

Using ASP.NET Mobile Forms

I wanted to use the normal ASP.NET Forms stuff in a mobile form.

  • Right click on the web site project and select Add new Item

1

  • Select Mobile Web Form. enter a name for the form and click on Add button

2

  • To use a style sheet & a JavaScript file, I added a DeviceSpecific with SupportJavaScript Filter. this is how the HTML code looks like

3 

  • Now I wanted to created some ASP controls. so I added another DeviceSpecific with isHTML32 Filter. this is how the HTML code looks like

4

 

  • One last thing, in order to make those DeviceSpecific Filters to work you need to add the required keys in the web.config file. this is how this would look like

untitled

Advertisements
 
2 Comments

Posted by on February 5, 2010 in Programming

 

Tags: , , , , , , , , , , , , , , ,

Write to a file using JavaScript


Use this function to write to a file using JavaScript

 

function WriteToFile(sMessage)
{
  try
  {
        var fso, s;
        fso = new ActiveXObject(“Scripting.FileSystemObject”);
        sFile = fso.OpenTextFile(“C:\\logs.txt”, 8);
        sFile.writeline(sMessage);
        sFile.Close();
  }
  catch(err)
  {
        var strErr = ‘Error:’;
        strErr += ‘\nNumber:’ + err.number;
        strErr += ‘\nDescription:’ + err.description;
        document.write(strErr);
  }
}

 
Leave a comment

Posted by on September 9, 2009 in Programming

 

Tags: , , , , , ,

 
%d bloggers like this: