Rambler's Top100
Главная
Новости
Статьи
Форумы
Книги
Коды
Сообщество
Блоги
О нас
 

Логин

Email:
  Пароль:

Войти
Зарегистрироваться
Забыл пароль

Поиск

 Искать :
 
Вперед

Сообщение

conderol


Известный Болтун

Зарегистрирован:
21 February 2005
Сообщения: 680
Примеры кода: 0
 

Re[4]: ..опять загрука файла ((

01 July 2006 22:24  


Лови...
<body MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:DataGrid id="DataGrid1" style="Z-INDEX: 101; LEFT: 144px; POSITION: absolute; TOP: 192px"
				runat="server" AutoGenerateColumns="False">
				<Columns>
					<asp:TemplateColumn>
						<EditItemTemplate>
							<INPUT id="File1" type="file" runat="server">
						</EditItemTemplate>
					</asp:TemplateColumn>
					<asp:BoundColumn DataField="name" ReadOnly="True"></asp:BoundColumn>
					<asp:EditCommandColumn ButtonType="LinkButton" UpdateText="Update" CancelText="Cancel" EditText="Edit"></asp:EditCommandColumn>
				</Columns>
			</asp:DataGrid>
			<asp:Label id="Label1" style="Z-INDEX: 102; LEFT: 160px; POSITION: absolute; TOP: 136px" runat="server">Label</asp:Label>
		</form>
	</body>
private void Page_Load(object sender, System.EventArgs e)
		{
			if (!Page.IsPostBack)
			{
				DataGrid1.DataSource=Source();
				DataGrid1.DataBind();
			}
		}
		private DataTable Source()
		{
			DataTable dt = new DataTable();
			dt.Columns.Add(new DataColumn("name",typeof(System.String)));
			DataRow dr = dt.NewRow();
			dr[0] = "1";
			dt.Rows.Add(dr);
			return dt;
		}
		private void DataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
		{
			DataGrid1.EditItemIndex = (int)e.Item.ItemIndex; 
			DataGrid1.DataSource=Source();
			DataGrid1.DataBind();
		}

		private void DataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
		{
			System.Web.UI.HtmlControls.HtmlInputFile uplTheFile = e.Item.FindControl("File1") as System.Web.UI.HtmlControls.HtmlInputFile;
			if (uplTheFile.Value==null || uplTheFile.Value=="")
				Label1.Text = "Nothing to upload";
			else
				Label1.Text = "Do upload";
		}




/**********Comments***************************/
We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With gr

Данное сообщение получено с сайта GotDotNet.RU
Последний раз редактировалось 01 July 2006 22:24
Наверх
  



Общие вопросы программирования на ASP.NET

 ..опять загрука файла ((Fixer  01 July 2006 18:19
 Re: ..опять загрука файла ((Fixer  01 July 2006 19:26
 ..опять загрука файла ((BlackTigerAP  01 July 2006 18:51
 Re: ..опять загрука файла ((Fixer  01 July 2006 19:05
 Re: ..опять загрука файла ((BlackTigerAP  01 July 2006 19:23
 Re[2]: ..опять загрука файла ((Fixer  01 July 2006 19:30
 Re[2]: ..опять загрука файла ((BlackTigerAP  01 July 2006 20:01
 Re[2]: ..опять загрука файла ((BlackTigerAP  01 July 2006 20:03
 Re[3]: ..опять загрука файла ((Fixer  01 July 2006 20:35
 Re[3]: ..опять загрука файла ((BlackTigerAP  01 July 2006 20:43
 Re[4]: ..опять загрука файла ((Fixer  01 July 2006 20:51
 Re[4]: ..опять загрука файла ((conderol  01 July 2006 22:24
 Re[5]: ..опять загрука файла ((Fixer  01 July 2006 23:23
 Re[5]: ..опять загрука файла ((conderol  01 July 2006 23:54
 Re[6]: ..опять загрука файла ((Fixer  02 July 2006 00:39
 Re[6]: ..опять загрука файла ((conderol  02 July 2006 00:51
 Re[6]: ..опять загрука файла ((conderol  02 July 2006 00:54
 Re[7]: ..опять загрука файла ((Fixer  02 July 2006 01:25
 Re[8]: ..опять загрука файла ((Fixer  02 July 2006 11:23
 
Наш Киев

Apartments for Rent

Rambler's Top100
Рейтинг@Mail.ru
Идея: Dimon aka Manowar Программирование: Dimon aka Manowar Дизайн: Dan Lebedev
Хостинг от компании Parking.ru
Карта сайта