Click here to Skip to main content
15,889,216 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: HOW TO INSERT DATA FROM A TABLE IN my ASP page TO SQL SERVER DATABASE Pin
Not Active23-May-10 3:30
mentorNot Active23-May-10 3:30 
GeneralRe: HOW TO INSERT DATA FROM A TABLE IN my ASP page TO SQL SERVER DATABASE Pin
ihbos23-May-10 8:23
ihbos23-May-10 8:23 
GeneralRe: HOW TO INSERT DATA FROM A TABLE IN my ASP page TO SQL SERVER DATABASE Pin
Not Active23-May-10 8:32
mentorNot Active23-May-10 8:32 
Questionmake different menu for site Pin
farasat.mohammad22-May-10 18:37
farasat.mohammad22-May-10 18:37 
AnswerRe: make different menu for site Pin
Sandeep Mewara22-May-10 20:39
mveSandeep Mewara22-May-10 20:39 
GeneralRe: make different menu for site Pin
farasat.mohammad23-May-10 19:46
farasat.mohammad23-May-10 19:46 
QuestionProblem with declaring namespace Pin
Eagle3222-May-10 12:21
Eagle3222-May-10 12:21 
QuestionCount number of records from a tabel and display result in a gridview column at run time. Pin
Eagle3222-May-10 11:58
Eagle3222-May-10 11:58 
Hi I am using a gridview to display data from my table at runtime. I am new to ASP.NET.

I am not using boundfields but I am using Template fields. I specify the HeaderText and DataKeys

I am using a web service to provide me a DataSet of the chosen table and bind it to the GridView in page_load event.

I would like to count the number of records from a chosen table and display that in the Gridview.

I have written a method to return number of records by passing in a string parameter product name
but i am not sure of how to invoke the method so the value is shown in the GridView.

How could i go about doing this?

Do i need to invoke the method using Eval like this:
<asp:TemplateField HeaderText="ProductName" SortExpression="ProductName">
      <ItemTemplate>
       <%#GetRowCount(Eval(ProductName))%>
  </ItemTemplate>
</asp:TemplateField>


Would the above work?

Thanks,
AnswerRe: Count number of records from a tabel and display result in a gridview column at run time. Pin
Sandeep Mewara22-May-10 20:35
mveSandeep Mewara22-May-10 20:35 
GeneralRe: Count number of records from a tabel and display result in a gridview column at run time. Pin
Eagle3223-May-10 1:32
Eagle3223-May-10 1:32 
QuestionChanging color on Boundfield text content Pin
lvq68422-May-10 8:21
lvq68422-May-10 8:21 
AnswerRe: Changing color on Boundfield text content Pin
Sandeep Mewara22-May-10 10:25
mveSandeep Mewara22-May-10 10:25 
GeneralRe: Changing color on Boundfield text content Pin
lvq68422-May-10 11:48
lvq68422-May-10 11:48 
GeneralRe: Changing color on Boundfield text content Pin
Sandeep Mewara22-May-10 20:31
mveSandeep Mewara22-May-10 20:31 
GeneralRe: Changing color on Boundfield text content Pin
lvq68422-May-10 20:49
lvq68422-May-10 20:49 
Questionhow to draw vertical rule in asp.net Pin
developerit22-May-10 3:28
developerit22-May-10 3:28 
AnswerRe: how to draw vertical rule in asp.net Pin
Yusuf22-May-10 7:01
Yusuf22-May-10 7:01 
AnswerRe: how to draw vertical rule in asp.net Pin
Tej Aj23-May-10 21:24
Tej Aj23-May-10 21:24 
Questionxml to gridview Pin
Tomlor198022-May-10 3:21
Tomlor198022-May-10 3:21 
AnswerCross post Pin
Not Active22-May-10 3:32
mentorNot Active22-May-10 3:32 
RantRe: xml to gridview Pin
dan!sh 22-May-10 5:59
professional dan!sh 22-May-10 5:59 
QuestionLooking for a pattern for managing URL in a Web Application Pin
Nadia Monalisa22-May-10 2:51
Nadia Monalisa22-May-10 2:51 
AnswerRe: Looking for a pattern for managing URL in a Web Application Pin
Not Active22-May-10 3:10
mentorNot Active22-May-10 3:10 
GeneralRe: Looking for a pattern for managing URL in a Web Application Pin
Nadia Monalisa22-May-10 3:15
Nadia Monalisa22-May-10 3:15 
GeneralRe: Looking for a pattern for managing URL in a Web Application Pin
Not Active22-May-10 3:23
mentorNot Active22-May-10 3:23 

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.