Click here to Skip to main content
15,888,610 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questiontargeting .js files into different directories using typescript and tsconfig file - need really some help Pin
indian14331-Dec-16 5:51
indian14331-Dec-16 5:51 
QuestionCalling get method using typescript - need really some help Pin
indian14331-Dec-16 5:40
indian14331-Dec-16 5:40 
QuestionHow Can I Expand the Field Name Column in an MVC Details view? Pin
Member 1282452923-Dec-16 14:41
Member 1282452923-Dec-16 14:41 
AnswerRe: How Can I Expand the Field Name Column in an MVC Details view? Pin
Afzaal Ahmad Zeeshan24-Dec-16 1:31
professionalAfzaal Ahmad Zeeshan24-Dec-16 1:31 
GeneralRe: How Can I Expand the Field Name Column in an MVC Details view? Pin
Member 1282452924-Dec-16 6:04
Member 1282452924-Dec-16 6:04 
GeneralRe: How Can I Expand the Field Name Column in an MVC Details view? Pin
Afzaal Ahmad Zeeshan24-Dec-16 7:29
professionalAfzaal Ahmad Zeeshan24-Dec-16 7:29 
AnswerRe: How Can I Expand the Field Name Column in an MVC Details view? Pin
Richard Deeming10-Jan-17 4:06
mveRichard Deeming10-Jan-17 4:06 
QuestionASP Button not displaying on Windows 2012 Server Pin
pmcm22-Dec-16 3:00
pmcm22-Dec-16 3:00 
I've an application that displays information in a gridview:

ASP.NET
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" Font-Size="X-Small" OnRowDataBound="GridView1_RowDataBound"
PageSize="100" DataSourceID="SiteDataSource1" Width="100%">
<PagerSettings Mode="NumericFirstLast" PageButtonCount="20" Position="TopAndBottom" />
<RowStyle CssClass="itemstyle" />
<HeaderStyle CssClass="headerstyle" />
<AlternatingRowStyle CssClass="altstyle" />    
<Columns>
    <asp:BoundField DataField="Description" HeaderText="Description" ReadOnly="True" SortExpression="Description">
        <ItemStyle Wrap="False" />
    </asp:BoundField>
    <asp:BoundField DataField="Identifier" HeaderText="Identifier" ReadOnly="True" SortExpression="Identifier">
        <ItemStyle Wrap="False" />
    </asp:BoundField>
    <asp:BoundField DataField="State" HeaderText="State" ReadOnly="True" SortExpression="State">
        <ItemStyle Wrap="False" />
    </asp:BoundField>
    <asp:BoundField DataField="HostHeaderValue" HeaderText="Host Header Value" ReadOnly="True"
        SortExpression="HostHeaderValue" />
    <asp:BoundField DataField="IPAddress" HeaderText="IP Address" ReadOnly="True" SortExpression="IPAddress" />
    <asp:BoundField DataField="Port" HeaderText="Port" ReadOnly="True" SortExpression="Port" />
    <asp:BoundField DataField="SSLPort" HeaderText="SSL Port" ReadOnly="True" SortExpression="SSLPort" />
    <asp:TemplateField ShowHeader="False">
        <ItemTemplate>
            <asp:Button ID="Button1" runat="server" CausesValidation="false" CommandName="Control"
                OnClick="Button_Clicked" Text="Control" Width="50" />
        </ItemTemplate>
        <ItemStyle Width="50px" />
    </asp:TemplateField>
</Columns>


the status of the button is set

C#
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        try
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                DataRowView entry = e.Row.DataItem as DataRowView;
                if (entry != null)
                {
                    switch (entry["State"] as string)
                    {
                        case "Stopped":
                            e.Row.Cells[2].BackColor = System.Drawing.Color.OrangeRed;
                            e.Row.Cells[2].ForeColor = System.Drawing.Color.White;
                            ((Button)e.Row.Cells[7].Controls[1]).Text = "Start";
                            ((Button)e.Row.Cells[7].Controls[1]).ForeColor = System.Drawing.Color.Green;
                            ((Button)e.Row.Cells[7].Controls[1]).CommandArgument = entry["Site"] as string + "|" + entry["Description"] as string;
                            break;
                        case "Running":
                            e.Row.Cells[2].BackColor = System.Drawing.Color.Honeydew;
                            ((Button)e.Row.Cells[7].Controls[1]).Text = "Stop";
                            ((Button)e.Row.Cells[7].Controls[1]).ForeColor = System.Drawing.Color.Red;
                            ((Button)e.Row.Cells[7].Controls[1]).CommandArgument = entry["Site"] as string + "|" + entry["Description"] as string;
                            break;
                        default:
                            e.Row.Cells[2].BackColor = System.Drawing.Color.Yellow;
                            e.Row.Cells[7].Text = "";
                            break;

                    }


on a Windows 2008 server the button displays with no issues, however when I view this page with the gridview the column with the button is empty on a Windows 2012 server. Has anyone seen this before? Any help/advice greatly appreciated.
AnswerRe: ASP Button not displaying on Windows 2012 Server Pin
Afzaal Ahmad Zeeshan22-Dec-16 3:57
professionalAfzaal Ahmad Zeeshan22-Dec-16 3:57 
GeneralRe: ASP Button not displaying on Windows 2012 Server Pin
pmcm22-Dec-16 4:02
pmcm22-Dec-16 4:02 
AnswerRe: ASP Button not displaying on Windows 2012 Server Pin
ZurdoDev22-Dec-16 5:15
professionalZurdoDev22-Dec-16 5:15 
GeneralRe: ASP Button not displaying on Windows 2012 Server Pin
pmcm22-Dec-16 23:47
pmcm22-Dec-16 23:47 
GeneralRe: ASP Button not displaying on Windows 2012 Server Pin
ZurdoDev23-Dec-16 2:12
professionalZurdoDev23-Dec-16 2:12 
QuestionConverting from XAML to HTML5 Pin
indian14320-Dec-16 11:24
indian14320-Dec-16 11:24 
AnswerRe: Converting from XAML to HTML5 Pin
koolprasad200320-Dec-16 22:39
professionalkoolprasad200320-Dec-16 22:39 
QuestionError: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5220-Dec-16 9:24
Scott5220-Dec-16 9:24 
AnswerRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
jkirkerx20-Dec-16 10:35
professionaljkirkerx20-Dec-16 10:35 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5221-Dec-16 1:50
Scott5221-Dec-16 1:50 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
jkirkerx21-Dec-16 9:18
professionaljkirkerx21-Dec-16 9:18 
GeneralRe: Error: Server did not recognize the value of HTTP Header SOAPAction Pin
Scott5222-Dec-16 1:59
Scott5222-Dec-16 1:59 
QuestionNeed help populating fields from database to form in page load Pin
Bootzilla3320-Dec-16 8:51
Bootzilla3320-Dec-16 8:51 
AnswerRe: Need help populating fields from database to form in page load Pin
Richard Deeming20-Dec-16 10:18
mveRichard Deeming20-Dec-16 10:18 
QuestionViewData, Viewbag and tempdata not working Pin
Member 815484520-Dec-16 6:47
Member 815484520-Dec-16 6:47 
AnswerRe: ViewData, Viewbag and tempdata not working Pin
Richard Deeming20-Dec-16 8:09
mveRichard Deeming20-Dec-16 8:09 
GeneralRe: ViewData, Viewbag and tempdata not working Pin
Member 815484520-Dec-16 8:36
Member 815484520-Dec-16 8:36 

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.