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

ASP.NET

 
AnswerRe: How to use prepared statement for displaying data using asp.net Pin
N a v a n e e t h9-May-09 18:28
N a v a n e e t h9-May-09 18:28 
AnswerRe: How to use prepared statement for displaying data using asp.net Pin
Abhishek Sur10-May-09 9:55
professionalAbhishek Sur10-May-09 9:55 
QuestionFundamental ASP.NET Question Pin
MarkMokris9-May-09 4:38
MarkMokris9-May-09 4:38 
AnswerRe: Fundamental ASP.NET Question Pin
Christian Graus9-May-09 10:25
protectorChristian Graus9-May-09 10:25 
AnswerRe: Fundamental ASP.NET Question Pin
Abhijit Jana9-May-09 11:17
professionalAbhijit Jana9-May-09 11:17 
GeneralRe: Fundamental ASP.NET Question Pin
AlexeiXX39-May-09 17:10
AlexeiXX39-May-09 17:10 
GeneralRe: Fundamental ASP.NET Question Pin
N a v a n e e t h9-May-09 18:18
N a v a n e e t h9-May-09 18:18 
GeneralRe: Fundamental ASP.NET Question Pin
AlexeiXX310-May-09 6:54
AlexeiXX310-May-09 6:54 
N a v a n e e t h wrote:
GridView will be regenerated on each postback.

It will be regenerated, but not by executing the sql statement again, it will be regenerated from the viewstate. You can use the sql profiler, or just put a breakpoint in the selecting event of the sqldatasource


I have the following code, and it only executes the SQL statement the first time the page is requested but not on postbacks caused a test button on the same page

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
    DataKeyNames="ID" DataSourceID="SqlDataSource1"
    EmptyDataText="There are no data records to display.">
    <Columns>
        <asp:BoundField DataField="ID" HeaderText="ID" ReadOnly="True"
            SortExpression="ID" />
        <asp:BoundField DataField="Name" HeaderText="Name"
            SortExpression="Name" />
    </Columns>
</asp:GridView>


SqlDataSource1 doesnt have caching enabled

Alexei Rodriguez

AnswerRe: Fundamental ASP.NET Question Pin
N a v a n e e t h9-May-09 18:24
N a v a n e e t h9-May-09 18:24 
Questionhow to display numbers in words Pin
Pawan Kiran9-May-09 3:11
Pawan Kiran9-May-09 3:11 
AnswerRe: how to display numbers in words Pin
Abhijit Jana9-May-09 3:24
professionalAbhijit Jana9-May-09 3:24 
AnswerRe: how to display numbers in words Pin
Ramesh Swaminathan9-May-09 3:29
Ramesh Swaminathan9-May-09 3:29 
QuestionASPX using third party UI OCX file Pin
The_Collector9-May-09 3:08
The_Collector9-May-09 3:08 
AnswerRe: ASPX using third party UI OCX file Pin
Ramesh Swaminathan9-May-09 3:34
Ramesh Swaminathan9-May-09 3:34 
GeneralRe: ASPX using third party UI OCX file Pin
The_Collector9-May-09 3:49
The_Collector9-May-09 3:49 
GeneralRe: ASPX using third party UI OCX file Pin
The_Collector15-May-09 22:52
The_Collector15-May-09 22:52 
Questioncapture Gridview cell value to an integer variable Pin
Pawan Kiran9-May-09 2:44
Pawan Kiran9-May-09 2:44 
AnswerRe: capture Gridview cell value to an integer variable Pin
Ramesh Swaminathan9-May-09 3:42
Ramesh Swaminathan9-May-09 3:42 
AnswerRe: capture Gridview cell value to an integer variable Pin
AlexeiXX39-May-09 17:18
AlexeiXX39-May-09 17:18 
QuestionBrowse ASP.NET app on windows mobile Pin
sunit_829-May-09 1:03
sunit_829-May-09 1:03 
AnswerRe: Browse ASP.NET app on windows mobile Pin
AlexeiXX39-May-09 17:20
AlexeiXX39-May-09 17:20 
GeneralRe: Browse ASP.NET app on windows mobile Pin
sunit_8210-May-09 20:19
sunit_8210-May-09 20:19 
QuestionHow to select area on a panel Pin
Nekkantidivya9-May-09 0:34
Nekkantidivya9-May-09 0:34 
AnswerRe: How to select area on a panel Pin
Christian Graus9-May-09 10:29
protectorChristian Graus9-May-09 10:29 
AnswerRe: How to select area on a panel Pin
Yusuf9-May-09 11:15
Yusuf9-May-09 11:15 

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.