eval and databinder.eval
-
i am currently in the rowe bound function of grid view in code behind. the synatx error is invalid character #
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
-
i am currently in the rowe bound function of grid view in code behind. the synatx error is invalid character #
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
-
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { quantityTotal += ((int)(Eval("Quantity"))); priceTotal += ((decimal)(Eval("SubTotal"))); } } there is a compilation mistake. i think i should use the <%# (inline binding) along with this Eval("Quantity") at opening and closing how to do this
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
I guess you are doing this in code behind. It's not possible to do this on code behind. You can use the
GridViewRowEventArgs
objecte
, and access the cell value instead.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia My Website | Ask smart questions
-
what u want to do . just to convert in integer. (int)(quantity) will convert in integer. Devjit Das.
i was trying to know the basic differences between eval("abc") databinder.eval(container.dataitem,"abc") as in the item template and edit item template the formmer one is working . i am not being able to understand in which condition , i should use which one, the former one , just making the syntax easy , i think.
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
-
i was trying to know the basic differences between eval("abc") databinder.eval(container.dataitem,"abc") as in the item template and edit item template the formmer one is working . i am not being able to understand in which condition , i should use which one, the former one , just making the syntax easy , i think.
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
go through this link http://forums.asp.net/p/984156/1264782.aspx or u have all ready visit then u must get the difference. Devjit Das.
-
i was trying to know the basic differences between eval("abc") databinder.eval(container.dataitem,"abc") as in the item template and edit item template the formmer one is working . i am not being able to understand in which condition , i should use which one, the former one , just making the syntax easy , i think.
Soniagupta1@yahoo.co.in Yahoo Messenger Id = soniagupta1
Eval is just syntactic sugar, it's just a shortcut that does the same thing. I got the impression you were trying to do a <%# block in your code behind, you can't - that block is to tell the aspx that it's code, you're already in the code behind and don't need it.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
go through this link http://forums.asp.net/p/984156/1264782.aspx or u have all ready visit then u must get the difference. Devjit Das.
helloooo i am using this query SELECT Format([StartDateTime], "dd mm yyyy") as StartDate, Format([StartDateTime], "dddd") as Day FROM Messages; output of this query:- StartDate Day StartDate Day 13 11 2007 Tuesday 13 11 2007 Tuesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday now i want to count starttime and out put like this Format(all things in MSaCCess) StartDate – Day - ChatCount 14 Nov 2007- Wednesday – 5 13 Nov 2007- Tuesday – 2
Piyush Vardhan Singh
-
helloooo i am using this query SELECT Format([StartDateTime], "dd mm yyyy") as StartDate, Format([StartDateTime], "dddd") as Day FROM Messages; output of this query:- StartDate Day StartDate Day 13 11 2007 Tuesday 13 11 2007 Tuesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday now i want to count starttime and out put like this Format(all things in MSaCCess) StartDate – Day - ChatCount 14 Nov 2007- Wednesday – 5 13 Nov 2007- Tuesday – 2
Piyush Vardhan Singh
-
but that in sql server and its in ms access syntax is very diff between them
Piyush Vardhan Singh
-
but that in sql server and its in ms access syntax is very diff between them
Piyush Vardhan Singh
-
helloooo i am using this query SELECT Format([StartDateTime], "dd mm yyyy") as StartDate, Format([StartDateTime], "dddd") as Day FROM Messages; output of this query:- StartDate Day StartDate Day 13 11 2007 Tuesday 13 11 2007 Tuesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday 14 11 2007 Wednesday now i want to count starttime and out put like this Format(all things in MSaCCess) StartDate – Day - ChatCount 14 Nov 2007- Wednesday – 5 13 Nov 2007- Tuesday – 2
Piyush Vardhan Singh