How to run an exe from a ASP.NET page?
For security reasons, you can’t force a user to run any executable. Instead give user the option to click on it and download the executable, and execute it if he wants to. All you can do is put .exe in a directory on your web site and put a hyperlink to it on some page. Note : Be sure to secure this directory by deactivating all execution permissions both in the IIS console and in the directory ACL For more details refer INFO: Executing Files by Hyperlink and the File Download Dialog Box
How can users take advantage of standard ASP.NET controls in mobile applications?
Here is an article from ftp online: Use ASP.NET With Mobile Web Forms
How can I create a server control?
The below example is a demonstration of a simple server control which creates a Text Box. Follow the below steps to create a new server control. Open VS.NET 2005. In File->New Select the Project submenu. In the Dialog window ,Select the Window, and select the WebControlLibrary. Select an appropriate path and give a name as TextControl, to create a new server control. usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Text; usingSystem.Web; usingSystem.Web.UI; usingSystem.Web.UI.WebControls; namespace WebCustomControl1 { [DefaultProperty(‘Text’)] [ToolboxData(‘<{0}:WebCustomControl1 runat=server></{0}:WebCustomControl1>’)] public class WebCustomControl1 : WebControl { public TextBox _text = new TextBox(); [Bindable(true)] [Category(‘Appearance’)] [DefaultValue(”)] [Localizable(true)] public string Text { get { String s = (String)ViewState[‘Text’]; return ((s == null) ? String.Empty : s); } set { ViewState[‘Text’] = value; } } protected override void CreateChildControls() { _text.Width = 200; _text.Height = 50; _text.Text = ‘Server Control Creation’; this.Controls.Add(_text); } protected override void RenderContents(HtmlTextWriter writer) { this.EnsureChildControls(); this.RenderChildren(writer); } } } Here is an article from ftp online: Build an ASP.NET Server Control that explains how to build a ‘Login Control’.
How to export data in Datagrid on a webform to Microsoft Excel
Two techniques for exporting the data in the DataGrid: Using the Excel MIME Type (or Content Type) With server-side code, you can bind the DataGrid to your data and have the data open in Excel on a client computer. To do this, set the ContentType to application/vnd.ms-excel. After the client receives the new stream, the data appears in Excel as if the content was opened as a new page in the Web browser. Using Excel Automation With client-side code, you can extract the HTML from the DataGrid and then Automate Excel to display the HTML in a new workbook. With Excel Automation, the data always appears outside the browser in an Excel application window. One advantage to Automation is that you can programmatically control Excel if you want to modify the workbook after the data is exported. However, because Excel is not marked as safe for scripting, your clients must apply security settings in the Web browser that allow Automation. For more details refer How To Export Data in a DataGrid on an ASP . NET WebForm to Microsoft Excel
Why do I get the error message ‘Access is denied : <myctrl>’ when I try to load a Custom Control
This is a common problem in ASP.NET. It happens because some program is scanning the Temporary ASP.NET files folders where your assemblies are copied. They have the files open in a mode that prevents ASP.NET itself from using the assembly file. For solution refer PRB: Access Denied Error When You Make Code Modifications with Index Services Running