Click here to Skip to main content
16,005,120 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: question about web.config in asp.net 2.0 Pin
Akhilesh Yadav29-Oct-06 23:10
Akhilesh Yadav29-Oct-06 23:10 
QuestionCall Postbach Pin
MHASSANF29-Oct-06 5:25
MHASSANF29-Oct-06 5:25 
AnswerRe: Call Postbach Pin
Guffa29-Oct-06 6:30
Guffa29-Oct-06 6:30 
QuestionGridview control Pin
dalbhidebipin29-Oct-06 3:52
dalbhidebipin29-Oct-06 3:52 
QuestionAnnotation Pin
sribachana29-Oct-06 2:14
sribachana29-Oct-06 2:14 
GeneralRe: Annotation Pin
Guffa29-Oct-06 5:07
Guffa29-Oct-06 5:07 
GeneralRe: Annotation Pin
sribachana29-Oct-06 18:15
sribachana29-Oct-06 18:15 
QuestionI am so tired....and I have no method to resolve the question by myself Pin
qiangv28-Oct-06 22:57
qiangv28-Oct-06 22:57 
I drag a DataList on the Web Designer,
and set a Dataset as it's DataSource.
the dataset is filled by Adapter using products table of Northwind.

oh,I paste the code here,help me found what is wrong.thank u.

aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>





<title>无标题页




<asp:datalist id="DataList1" runat="server">
<itemtemplate>
<asp:button id="Button1" runat="server" commandargument="<%# Eval("ProductName") %>"
="" oncommand="Button1_Command" text="<%# Eval("ProductName") %>">









---------------
aspx.cs
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;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=Northwind;User Id=sa;Password=;");
SqlCommand comm = new SqlCommand("select * from Products", conn);
SqlDataAdapter da = new SqlDataAdapter(comm);

DataSet ds = new DataSet();
da.Fill(ds);

DataList1.DataSource = ds;
DataList1.DataBind();
}
protected void Button1_Command(object sender, CommandEventArgs e)
{
Response.Write(e.CommandArgument.ToString());
}
}
AnswerRe: I am so tired....and I have no method to resolve the question by myself Pin
qiangv28-Oct-06 23:02
qiangv28-Oct-06 23:02 
QuestionBubbleEvent [modified] Pin
greekius28-Oct-06 21:26
greekius28-Oct-06 21:26 
QuestionBased on frames Pin
sribachana28-Oct-06 21:21
sribachana28-Oct-06 21:21 
QuestionBased on Javascript Pin
sribachana28-Oct-06 20:18
sribachana28-Oct-06 20:18 
AnswerRe: Based on Javascript Pin
Tamimi - Code28-Oct-06 20:25
Tamimi - Code28-Oct-06 20:25 
QuestionNeeed HELP Pin
TazzT28-Oct-06 11:18
TazzT28-Oct-06 11:18 
AnswerRe: Useless subject Pin
Guffa28-Oct-06 11:56
Guffa28-Oct-06 11:56 
GeneralRe: Useless subject Pin
Jerry Hammond28-Oct-06 16:21
Jerry Hammond28-Oct-06 16:21 
GeneralRe: Useless subject Pin
TazzT29-Oct-06 6:59
TazzT29-Oct-06 6:59 
AnswerRe: Useless subject Pin
Guffa29-Oct-06 10:07
Guffa29-Oct-06 10:07 
GeneralRe: Useless subject Pin
TazzT29-Oct-06 20:54
TazzT29-Oct-06 20:54 
Questionhow could i set any image is created at runtime to image box Pin
greekius28-Oct-06 7:57
greekius28-Oct-06 7:57 
AnswerRe: set Run time created image to image1 Pin
Guffa28-Oct-06 8:55
Guffa28-Oct-06 8:55 
QuestionA Permission question Pin
Xiaoming Qian28-Oct-06 5:36
Xiaoming Qian28-Oct-06 5:36 
Questionuser control events Pin
greekius28-Oct-06 2:09
greekius28-Oct-06 2:09 
QuestionUsing Context Object Disadvantages !!? Pin
Naif_Prof28-Oct-06 1:58
Naif_Prof28-Oct-06 1:58 
AnswerRe: Using Context Object Disadvantages !!? Pin
nature027628-Oct-06 14:00
nature027628-Oct-06 14:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.