Click here to Skip to main content
15,912,756 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: compare Date and Time Pin
N a v a n e e t h9-Feb-09 20:53
N a v a n e e t h9-Feb-09 20:53 
QuestionSession array Pin
Sandraa9-Feb-09 9:59
Sandraa9-Feb-09 9:59 
AnswerRe: Session array Pin
Ranjit Viswakumar9-Feb-09 16:12
Ranjit Viswakumar9-Feb-09 16:12 
GeneralRe: Session array Pin
Sandraa11-Feb-09 8:40
Sandraa11-Feb-09 8:40 
GeneralRe: Session array Pin
Sandraa11-Feb-09 8:49
Sandraa11-Feb-09 8:49 
Questionsenerio Pin
suni_dotnet9-Feb-09 5:48
suni_dotnet9-Feb-09 5:48 
AnswerRe: senerio Pin
Ray Wampler9-Feb-09 6:34
Ray Wampler9-Feb-09 6:34 
GeneralRe: senerio Pin
suni_dotnet9-Feb-09 6:57
suni_dotnet9-Feb-09 6:57 
hi,
thanks a lot for your reply,
this is what i wanted, but i need the 'dt' value outside the if(session...) statement.As this is giving me "the name 'dt' doesnot exist in the current context" error. And if i create 'dt' outside this session statement, dt is initializing for every postback...

foreach (GridViewRow row in GridView1.Rows)
{
CheckBox box1 = (CheckBox)row.FindControl("CheckBox1");
if (box1.Checked)
{
if (Session["MyButton_Handled"] == null)
{
DataTable dt = new DataTable();
dt.Columns.Add("Items");
dt.Columns.Add("Price");
Session["MyButton_Handled"] = true;
}
DataTable dt = (DataTable)Session["tablevalues"];
DataRow dr = dt.NewRow();
string name1 = row.Cells[2].Text;
double cost1 = Convert.ToDouble(row.Cells[3].Text);
dr["Items"] = name1;
dr["Price"] = cost1;
dt.Rows.Add(dr);
GridView2.DataSource = dt;
GridView2.DataBind();
Session["tablevalues"] = dt;
cost = cost + cost1;
Label12.Visible = true;
Label12.Text = "Total Price " + cost ;
}
thanks,
GeneralRe: senerio Pin
Ray Wampler9-Feb-09 7:21
Ray Wampler9-Feb-09 7:21 
GeneralRe: senerio Pin
Ray Wampler9-Feb-09 7:24
Ray Wampler9-Feb-09 7:24 
GeneralRe: senerio Pin
suni_dotnet9-Feb-09 7:37
suni_dotnet9-Feb-09 7:37 
Question"A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 4:19
markymark829-Feb-09 4:19 
AnswerRe: "A validation error has occurred".... script attacks... Pin
led mike9-Feb-09 4:51
led mike9-Feb-09 4:51 
GeneralRe: "A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 5:01
markymark829-Feb-09 5:01 
GeneralRe: "A validation error has occurred".... script attacks... Pin
Paddy Boyd9-Feb-09 5:21
Paddy Boyd9-Feb-09 5:21 
GeneralRe: "A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 5:24
markymark829-Feb-09 5:24 
GeneralRe: "A validation error has occurred".... script attacks... Pin
Paddy Boyd9-Feb-09 5:27
Paddy Boyd9-Feb-09 5:27 
GeneralRe: "A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 5:31
markymark829-Feb-09 5:31 
GeneralRe: "A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 5:48
markymark829-Feb-09 5:48 
AnswerRe: "A validation error has occurred".... script attacks... Pin
Ranjit Viswakumar9-Feb-09 16:16
Ranjit Viswakumar9-Feb-09 16:16 
GeneralRe: "A validation error has occurred".... script attacks... Pin
markymark829-Feb-09 22:33
markymark829-Feb-09 22:33 
QuestionUser control datalist populating?? Pin
tadhg889-Feb-09 2:59
tadhg889-Feb-09 2:59 
QuestionASP.NET MVC Framework Pin
Brendan Vogt9-Feb-09 2:47
Brendan Vogt9-Feb-09 2:47 
AnswerRe: ASP.NET MVC Framework Pin
ToddHileHoffer9-Feb-09 3:32
ToddHileHoffer9-Feb-09 3:32 
AnswerRe: ASP.NET MVC Framework Pin
Ranjit Viswakumar9-Feb-09 16:25
Ranjit Viswakumar9-Feb-09 16:25 

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.