Sep182009

Free Asp.net UI controls

MetaBuilders WebControls Server Control Library Here's the list of controls available  AdSense Ads - Controls to show your Google AdSense ads. CheckedListBox - A Listbox with checkboxes for selection ComboBox - The classic type-or-choose control. DataControlFields - Three fields for the GridView, BooleanField for boolean values (better than the CheckBoxField), LookupField for ID/Key data to a child datasource, and SelectorField for row selection using checkboxes or radiobuttons. DialogWindow - A set of controls which make creating dialog windows a lot easier DualList - move items back and forth between two listboxes to select the items DynamicListBox...

Sep022009

Programmatically Download File from Remote Location to User Through Server

using System; using System.Data; using System.Configuration; 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.Data.SqlClient; using System.Data.Sql; using System.Net; using System.IO; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { //base.OnLoad(e); string url = string.Empty;// Request.QueryString["DownloadUrl"]; if (url == null || url.Length == 0) { url = "http://img444.imageshack.us/img444/6228/initialgridsq7.jpg"; } //Initialize the input stream HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); int bufferSize = 1; //Initialize...

Sep022009

Get the index of the SelectedRow in a DataGridView

The below codes show how to do that private void dataGridView1_SelectionChanged(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 1) { txtCustcode.Text = dataGridView1.Rows[dataGridView1.SelectedRows[0].Index].Cells["CustomerCode"].Value.ToString(); }...

Sep022009

Data grid view multiple checkbox selection

this shows how to use datagrid view and check boxes , and find which check box was checked for (int i = 0; i < dgGrid.Rows.Count; i++) { GridViewRow row = dgGrid.Rows[i]; bool isChecked = ((CheckBox)row.FindControl("chkSelect")).Checked; if (isChecked) { xSideID = dgGrid.Rows[i].Cells[1].Text; } } ...

Sep012009

How to read the comma seperated values from a string asp.net C#?

string myString = "A, B, C, D"; string delimStr = " ,"; char[] delimiter = delimStr.ToCharArray(); foreach (string s in myString.Split(delimiter)) { Response.Write (s.ToString ()+ " ");...

Pages 141234 »