Click here to Skip to main content
16,004,882 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionSSL error - unable to download attachments Pin
Cafedreamz28-Feb-07 4:28
Cafedreamz28-Feb-07 4:28 
QuestionSecurity exception with windows server 2003 Pin
Cafedreamz28-Feb-07 4:27
Cafedreamz28-Feb-07 4:27 
QuestionDownload option...? Pin
fmlove28-Feb-07 4:21
fmlove28-Feb-07 4:21 
AnswerRe: Download option...? Pin
Naveed Kamboh28-Feb-07 10:14
Naveed Kamboh28-Feb-07 10:14 
GeneralRe: Download option...? Pin
fmlove28-Feb-07 18:53
fmlove28-Feb-07 18:53 
GeneralRe: Download option...? Pin
Naveed Kamboh28-Feb-07 22:35
Naveed Kamboh28-Feb-07 22:35 
AnswerRe: Download option...? Pin
Vasudevan Deepak Kumar4-Mar-07 2:30
Vasudevan Deepak Kumar4-Mar-07 2:30 
QuestionInserting a new row. Pin
nclauder28-Feb-07 4:09
nclauder28-Feb-07 4:09 
Hi,
I want to share this problem. I have a datagrid that will help me Insert data into sql database. So I made a button On my form so that when I press the button a new row on datagrid should be created and I could be able to insert data. But with this code below I've failed could someone help me and tell me where I'm going wrong:

private void Page_Load(object sender, System.EventArgs e)
{
if (! IsPostBack)
{

Fill();
Bind();
}
}
DataTable table = new DataTable();
private void Fill()
{
SqlDataAdapter adapter = new SqlDataAdapter("select * from dbo.DashBoard", con);
adapter.Fill(table);
}
private void Bind()
{
dgis.DataSource = table;
dgis.DataBind();
}

private void InsertEmpty()
{
table.Rows.InsertAt(table.NewRow(), 0);
}

private void bttnew_Click(object sender, System.EventArgs e)
{
// inserting
dgis.EditItemIndex = 0;

// modify text
EditCommandColumn ecc = (EditCommandColumn) dgis.Columns[6];
ecc.UpdateText = "Update";

// fill table, insert empty row, bind to datagrid
Fill();
InsertEmpty();
Bind();
}

private void dgis_ItemCommand(object source,System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
// stop editing
dgis.EditItemIndex = -1;

switch (e.CommandName)
{
case "Insert":
break;

case "Update":
break;

case "Cancel":
break;

case "Edit":
// begin editing
EditCommandColumn ecc = (EditCommandColumn) dgis.Columns[6];
ecc.UpdateText = "Insert";
dgis.EditItemIndex = e.Item.ItemIndex;
break;
}

// fill and bind
Fill();
//InsertEmpty();
Bind();
}

Thanks.
QuestionPopup Control behaviour Pin
John Gathogo28-Feb-07 4:07
John Gathogo28-Feb-07 4:07 
AnswerRe: Popup Control behaviour Pin
Sylvester george28-Feb-07 20:24
Sylvester george28-Feb-07 20:24 
QuestionNeed Help URGENTLY Pin
Ahmed EL Gendy28-Feb-07 4:05
Ahmed EL Gendy28-Feb-07 4:05 
AnswerRe: Need Help URGENTLY Pin
_mubashir28-Feb-07 8:42
_mubashir28-Feb-07 8:42 
QuestionGet parent member value upon serialization Pin
!C3nturion^28-Feb-07 3:26
!C3nturion^28-Feb-07 3:26 
AnswerRe: Get parent member value upon serialization Pin
kubben28-Feb-07 3:57
kubben28-Feb-07 3:57 
GeneralRe: Get parent member value upon serialization Pin
!C3nturion^28-Feb-07 6:06
!C3nturion^28-Feb-07 6:06 
Questionalert mail Pin
saravanan0528-Feb-07 2:52
saravanan0528-Feb-07 2:52 
AnswerRe: alert mail Pin
Vasudevan Deepak Kumar4-Mar-07 2:31
Vasudevan Deepak Kumar4-Mar-07 2:31 
QuestionTextbox to display Pin
Oga M28-Feb-07 2:31
Oga M28-Feb-07 2:31 
GeneralRe: Textbox to display Pin
badgrs28-Feb-07 3:02
badgrs28-Feb-07 3:02 
GeneralRe: Textbox to display Pin
ednrgc28-Feb-07 3:45
ednrgc28-Feb-07 3:45 
GeneralRe: Textbox to display Pin
Oga M28-Feb-07 20:43
Oga M28-Feb-07 20:43 
AnswerRe: Textbox to display Pin
Sylvester george28-Feb-07 3:07
Sylvester george28-Feb-07 3:07 
Questionproblem in Running the website Pin
Pankaj Garg28-Feb-07 2:17
Pankaj Garg28-Feb-07 2:17 
AnswerRe: problem in Running the website Pin
badgrs28-Feb-07 3:01
badgrs28-Feb-07 3:01 
QuestionExam webportal Pin
yuvachandra28-Feb-07 2:02
yuvachandra28-Feb-07 2:02 

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.