Click here to Skip to main content
15,891,745 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionVertical Scroll bar in a treeview Pin
meeram39512-May-09 1:44
meeram39512-May-09 1:44 
AnswerRe: Vertical Scroll bar in a treeview Pin
Ramesh Swaminathan12-May-09 2:48
Ramesh Swaminathan12-May-09 2:48 
GeneralRe: Vertical Scroll bar in a treeview Pin
meeram39512-May-09 2:52
meeram39512-May-09 2:52 
AnswerRe: Vertical Scroll bar in a treeview Pin
Member 475589313-May-09 1:20
Member 475589313-May-09 1:20 
QuestionShow video in Thumbnail Pin
Jain Vijay12-May-09 1:39
Jain Vijay12-May-09 1:39 
AnswerRe: Show video in Thumbnail Pin
Ramesh Swaminathan12-May-09 2:14
Ramesh Swaminathan12-May-09 2:14 
AnswerRe: Show video in Thumbnail Pin
Christian Graus12-May-09 2:17
protectorChristian Graus12-May-09 2:17 
RantGridView ButtonField Image vs Button and RowCommand Pin
binarymax12-May-09 1:20
binarymax12-May-09 1:20 
I thought I would post this because it was driving me nuts.

When you are firing a RowCommand from a GridView ButtonField when the ButtonField is of type Image, Page.IsPostBack is false

Button column as image:
<asp:GridView ID="gvMyGrid" runat="server" AutoGenerateColumns="false" Width="200px" >
   ...
   <asp:ButtonField CommandName="Up" ButtonType="Image" ImageUrl="Images/up.gif" />
</Columns>


When you are firing a RowCommand from a GridView ButtonField when the ButtonField is of type Button, Page.IsPostBack is true

Button column as button:
<asp:GridView ID="gvMyGrid" runat="server" AutoGenerateColumns="false" Width="200px" >
   ...
   <asp:ButtonField CommandName="Up" ButtonType="Button" Text="Up" />
</Columns>



Code Behind:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            'This code will be reached on first load and also when the user clicks a Gridview ButtonField Image!!!
        End If
End Sub

Protected Sub gvMyGrid_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles gvMyGrid.RowCommand
   ...
End Sub

GeneralRe: GridView ButtonField Image vs Button and RowCommand Pin
Member 387988112-May-09 2:05
Member 387988112-May-09 2:05 
GeneralRe: GridView ButtonField Image vs Button and RowCommand Pin
binarymax12-May-09 2:30
binarymax12-May-09 2:30 
QuestionTwo menus, but only one web.sitemap file Pin
NetQuestions12-May-09 0:44
NetQuestions12-May-09 0:44 
AnswerRe: Two menus, but only one web.sitemap file Pin
Samer Aburabie12-May-09 5:44
Samer Aburabie12-May-09 5:44 
GeneralRe: Two menus, but only one web.sitemap file Pin
NetQuestions12-May-09 9:48
NetQuestions12-May-09 9:48 
Questioncreating setup in window service Pin
kuwl_mark12-May-09 0:44
kuwl_mark12-May-09 0:44 
AnswerRe: creating setup in window service Pin
Vimalsoft(Pty) Ltd12-May-09 1:09
professionalVimalsoft(Pty) Ltd12-May-09 1:09 
QuestionHow to send automatic alerts?? Pin
venkatasatyakota12-May-09 0:15
venkatasatyakota12-May-09 0:15 
AnswerRe: asp.net doubt Pin
Manas Bhardwaj12-May-09 0:19
professionalManas Bhardwaj12-May-09 0:19 
AnswerRe: How to send automatic alerts?? Pin
DeveloperAtul12-May-09 0:45
DeveloperAtul12-May-09 0:45 
AnswerRe: How to send automatic alerts?? Pin
Member 387988112-May-09 2:07
Member 387988112-May-09 2:07 
AnswerRe: How to send automatic alerts?? Pin
goodideadave12-May-09 6:45
goodideadave12-May-09 6:45 
Questionhow not to show the Directory list in the web browser? Pin
Subin Alex12-May-09 0:03
Subin Alex12-May-09 0:03 
AnswerRe: how not to show the Directory list in the web browser? Pin
Ramesh Swaminathan12-May-09 0:12
Ramesh Swaminathan12-May-09 0:12 
AnswerRe: how not to show the Directory list in the web browser? Pin
Manas Bhardwaj12-May-09 0:23
professionalManas Bhardwaj12-May-09 0:23 
AnswerRe: how not to show the Directory list in the web browser? Pin
scottgp12-May-09 0:27
professionalscottgp12-May-09 0:27 
AnswerRe: how not to show the Directory list in the web browser? Pin
Baran M12-May-09 1:10
Baran M12-May-09 1:10 

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.