Click here to Skip to main content
15,915,093 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralDataDridView Have A Footer Pin
Thaer Hamael30-Dec-07 20:47
Thaer Hamael30-Dec-07 20:47 
GeneralRe: DataDridView Have A Footer Pin
Michael Sync30-Dec-07 21:05
Michael Sync30-Dec-07 21:05 
QuestionRe: DataDridView Have A Footer Pin
Sun Rays30-Dec-07 21:06
Sun Rays30-Dec-07 21:06 
GeneralRe: DataDridView Have A Footer Pin
Michael Sync30-Dec-07 21:10
Michael Sync30-Dec-07 21:10 
GeneralRe: DataDridView Have A Footer Pin
Sun Rays30-Dec-07 21:12
Sun Rays30-Dec-07 21:12 
GeneralRe: DataDridView Have A Footer Pin
Thaer Hamael31-Dec-07 0:22
Thaer Hamael31-Dec-07 0:22 
GeneralRe: DataDridView Have A Footer Pin
Sun Rays30-Dec-07 21:05
Sun Rays30-Dec-07 21:05 
GeneralCan't figure out the error:does not exist in the current context Pin
Albert8330-Dec-07 20:28
Albert8330-Dec-07 20:28 
Hello everybody,

I am getting an error: The name 'DataList1' does not exist in the current context.
DataList1 is a data list the code is in two pages:
Have no idea what the problem is. Any assistance is appreciated.

groups.aspx, and groups.aspx.cs

groups.aspx:

I remobed the open tags so that the code can be seen.

asp:DataList ID="DataList1" runat="server" DataSourceID="ChalkDL">
ItemTemplate>
asp:TextBox ID="postComment" runat="server">
asp:Button runat="server" OnClick="postBtn_Click" ID="postBtn" Text="Post!" />
/ItemTemplate>
/asp:DataList>


groups.aspx.cs
protected void postBtn_Click(object sender, EventArgs e)
{
SqlDataSource PostDS = new SqlDataSource();

System.Web.UI.WebControls.TextBox PostText = (System.Web.UI.WebControls.TextBox)DataList1.FindControl("postComment");

PostDS.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionString"].ToString();

PostDS.InsertCommandType = SqlDataSourceCommandType.Text;
PostDS.InsertCommand = "INSERT INTO GroupChalkboard (Text, GroupID, UserID, CreatedDate) VALUES (@Text, @GroupID, @UserID, @CreatedDate)";

PostDS.InsertParameters.Add("Text", PostText.Text);
PostDS.InsertParameters.Add("GroupID", pid.ToString());
PostDS.InsertParameters.Add("UserID", Session["UserID"].ToString());
PostDS.InsertParameters.Add("CreatedDate", DateTime.Now.ToString());

PostDS.Insert();
}
GeneralRe: Can't figure out the error:does not exist in the current context Pin
Imran Khan Pathan30-Dec-07 20:57
Imran Khan Pathan30-Dec-07 20:57 
GeneralRe: Can't figure out the error:does not exist in the current context Pin
Albert8330-Dec-07 21:04
Albert8330-Dec-07 21:04 
GeneralRe: Can't figure out the error:does not exist in the current context Pin
Imran Khan Pathan31-Dec-07 0:30
Imran Khan Pathan31-Dec-07 0:30 
GeneralRe: Can't figure out the error:does not exist in the current context Pin
Albert8331-Dec-07 7:57
Albert8331-Dec-07 7:57 
GeneralCheckbox in a grid Pin
SreejithAchutan30-Dec-07 20:00
SreejithAchutan30-Dec-07 20:00 
GeneralRe: Checkbox in a grid Pin
Michael Sync30-Dec-07 20:03
Michael Sync30-Dec-07 20:03 
GeneralRe: Checkbox in a grid Pin
neerubee30-Dec-07 20:08
neerubee30-Dec-07 20:08 
GeneralRe: Checkbox in a grid Pin
Sun Rays30-Dec-07 20:43
Sun Rays30-Dec-07 20:43 
GeneralRe: Checkbox in a grid Pin
SreejithAchutan30-Dec-07 21:15
SreejithAchutan30-Dec-07 21:15 
GeneralRe: Checkbox in a grid Pin
Sun Rays30-Dec-07 21:39
Sun Rays30-Dec-07 21:39 
GeneralRe: Checkbox in a grid Pin
SreejithAchutan30-Dec-07 21:54
SreejithAchutan30-Dec-07 21:54 
GeneralRe: Checkbox in a grid Pin
Sun Rays30-Dec-07 22:01
Sun Rays30-Dec-07 22:01 
GeneralRe: Checkbox in a grid Pin
SreejithAchutan30-Dec-07 22:13
SreejithAchutan30-Dec-07 22:13 
GeneralRe: Checkbox in a grid Pin
rahul.net1130-Dec-07 21:47
rahul.net1130-Dec-07 21:47 
GeneralWorking with dynamically created controls Pin
Anuradha61230-Dec-07 18:55
Anuradha61230-Dec-07 18:55 
GeneralRe: Working with dynamically created controls Pin
Paul Conrad30-Dec-07 18:58
professionalPaul Conrad30-Dec-07 18:58 
GeneralRe: Working with dynamically created controls Pin
Anuradha61230-Dec-07 19:05
Anuradha61230-Dec-07 19:05 

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.