AFAIK, there
Archive for the ‘.Net control Codes’ Category
Convert the Request URL to an SSL/HTTPS link
December 28th, 2009
Ankit For example to take the current request URL and converted it to a secure URL can be done like this: Secure Sockets Layer (SSL). UriBuilder build = new UriBuilder(Request.Url); build.Scheme = “https”; build.Port = -1; // don’t inject port Uri newUri = build.Uri; string newUrl = build.ToString();
Request Object of ASP .NET related to Paths
December 28th, 2009
Ankit Request Object Here’s a list of the Path related properties on the Request object (and the Page object). Assume a path like http://www.avmendapara.com/wallpaper/admin/paths.aspx for the paths below where webstore is the name of the virtual. here property of request object given ApplicationPath : Returns the web root-relative logical path to the virtual root of this [...]
Download Data Services Update for .NET 3.5 SP1
December 17th, 2009
Ankit Data Services Update for .NET 3.5 We
Rename your all files located in one folder
November 5th, 2009
Ankit rename files just use this code its rename all files which is located in your folder path string dest; string[] a = new string[5]; string b = Server.MapPath(“your folder path”); a = Directory.GetFiles(b); for (int i = 0; i < a.Length; i++) { FileInfo sos = new FileInfo(a[i].ToString()); //string c = a[i].ToString(); //source = a[i].ToString(); [...]
Renaming In .net With C#
November 5th, 2009
Ankit Renaming Your files using c# just copy and paste your code. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; namespace rhozetApplication3 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private int File_Delete(string Filepath) { FileInfo fi = new FileInfo(Filepath); if (fi.Exists) { [...]
Ajax CollapsiblePanelExtender in .net
October 28th, 2009
Ankit Ajax CollapsiblePanelExtender in Asp.Net: There are the following easy steps to understand how to use Ajax CollapsiblePanelExtender control in Asp.Net. Step 1: Create new Ajax enabled website Step 2: Now go to solution explorer and right click on root directory and click on Add reference then add AjaxControlTollkit.dll. Step 3: Copy the following code and [...]
File Upload Control
October 21st, 2009
Ankit //fileupload.aspx.cs file 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; using System.IO; public partial class fileupload : System.Web.UI.Page { string destpath; public string filename; public static string[] name = new string[20]; public static int i = 0; protected void Page_Load(object sender, EventArgs e) [...]
RSS Feed
Twitter
Posted in
Tags: