Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 875 Vote(s) - 3.47 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting a "Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException:" error everytime I click on a <asp:ImageButton />

#1
Help!

I have a GridView with an `<asp:TemplateField><ItemTemplate>` combination. Inside this combination I have an `<asp:ImageButton ...>` It looks nice but everytime I click on this button I get an error:

> Microsoft JScript runtime error:
> Sys.WebForms.PageRequestManagerServerErrorException: An unknown error
> occurred while processing the request on the server. The status code
> returned from the server was: 500

I don't even get to the event that button fires.

Here is my HTML code:

<asp:GridView
ID="PuckGridView"
runat="server"
EmptyDataText="Sorry, no data available"
AutoGenerateColumns="False"
AllowSorting="True"
Font-Size = "X-Small"
Width = "1150px"
Height = "410px"
onselectedindexchanged="PuckGridView_SelectedIndexChanged"
onrowcommand="RowUserActivity"
onpageindexchanging="PuckGridView_PageIndexChanging"
onrowdatabound="PuckGridView_RowDataBound"
GridLines="Horizontal"
onsorting="PuckGridView_Sorting"
HeaderStyle-HorizontalAlign="Left">
<AlternatingRowStyle BackColor="#99CCFF" ForeColor="Black" />
<Columns>
<asp:TemplateField SortExpression="Status" HeaderText="Status">
<ItemTemplate>
<asp:ImageButton runat="server" ImageUrl='<%# "~/Images/" + Eval("StatusImage").ToString() %>' CommandName="UpdateStatus" />
<%-- <asp:Image ID="statusImage" runat="server" ImageUrl='<%# "~/Images/" + Eval("StatusImage").ToString() %>' />--%>
<asp:Label ID="status" runat="server" Text='<%# Bind("StatusText") %>'></asp:Label>
<br />
<asp:Image ID="onCallImage" runat="server" ImageUrl='<%# "~/Images/" + DisplayCorrectOnCallImage(Eval("OnCallImage")) %>' />
<asp:HiddenField ID="HiddenEmail" runat="server" Value='<%# Eval("Email") %>' />
<asp:HiddenField ID="HiddenUserName" runat="server" Value='<%# Eval("UserName") %>' />
<asp:HiddenField ID="HiddenFirstName" runat="server" Value='<%# Eval("FirstName") %>' />
<asp:HiddenField ID="HiddenLastName" runat="server" Value='<%# Eval("LastName") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" SortExpression="FirstName" DataField="FirstName" HeaderText="FirstName" Visible="true" />
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" SortExpression="LastName" DataField="LastName" HeaderText="LastName" Visible="true" />
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" DataField="OfficePhone" HeaderText="Phone" Visible="true" />
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" SortExpression="TeamRole" DataField="TeamRole" HeaderText="Team/Role" Visible="true" />
<asp:BoundField ItemStyle-HorizontalAlign="Left" HeaderStyle-HorizontalAlign="Left" SortExpression="Location" DataField="Location" HeaderText="Location" Visible="true" />
<asp:ButtonField HeaderText="Mail" ButtonType="Image" CommandName="SendMail" ImageUrl="~/Images/mail.gif" Visible="true"/>
<asp:TemplateField>
<ItemTemplate>
<asp:Image ID="imgHours" ToolTip=' <%# Eval("Hours") %> ' ImageUrl='<%# "~/Images/clock.gif" %>' runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField ItemStyle-HorizontalAlign="Left" DataField="Message" HeaderText="Message" Visible="true" />
</Columns>
<HeaderStyle BackColor="#CCCCCC" />
</asp:GridView>
Reply

#2
Try to see if there are any invalid html tags. or try viewstate=false
Reply

#3
Try removing this line:

<%-- <asp:Image ID="statusImage" runat="server" ImageUrl='<%# "~/Images/" + Eval("StatusImage").ToString() %>' />--%>

I have had troubled with commented things in templates previously

Also check your

onselectedindexchanged="PuckGridView_SelectedIndexChanged"

event as this may also fire when you click on the row
Reply



Forum Jump:


Users browsing this thread:
3 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through