I have a strange problem with my asp.net website.
I want to run it on two different servers. On one server there is no problem at all but on the other i get the following error message when trying to open it with chrome or ie.
Server Error in '/RTA/ETO' Application.
Parser Error
Description: An error occurred during the parsing of a resource
required to service this request. Please review the following specific
parse error details and modify your source file appropriately.
Parser Error Message:
System.Web.UI.HtmlControls.HtmlTableCellCollection must have items of
type 'System.Web.UI.HtmlControls.HtmlTableCell'. 'asp:TextBox' is of
type 'System.Web.UI.WebControls.TextBox'.
Source Error:
Line 170: Line 171: Line 172:
Text="" ValidationGroup="Size" Visible = 'false' Width="100%"
TabIndex="4" > Line 174:
the code:
<tr id="tr_customerMarketOrganization" runat="server">
<td align="left" colspan="1" valign="top" class="auto-style3">
<asp:Label ID="L_CustomerMarketOrganization" runat="server" Font-Bold="True" Font-Size="1em"
ForeColor="#14007F"></asp:Label>
</td>
<td align="left"; class="style19">
**here ist line 172** <asp:TextBox ID="tbCustomer" runat="server"
Text="" ValidationGroup="Size" Visible = 'false' Width="100%" TabIndex="4" ></asp:TextBox>
</td>
<td colspan="2">
<asp:Label ID="L_Error_Customer" runat="server" Font-Names="Arial" ForeColor="Red" Visible="False"></asp:Label>
</td>
</tr>
Source File: /RTA/Konfigurator_ETO/default.aspx Line: 172
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.19028
No idea about why this error occurs but i had this issue too, just i restart my system and run the application, it work fine now.
I solved this problem by simply reupload the files on the server. So the code wasn't the problem.
This is a parsing error. There are single quotes that need to be double quotes around Visible = 'false' --> Visible = "false".
Related
I have a listview with multiple rows, each row corresponds to a SQL database row, populated on page load.
The listview is made up of multiple tables, each contains my columns data from my database and one hyperlink button that redirects the user to another webpage.
When the user clicks the hyperlink I would like to pass an Eval value to another webpage (serverside) without using a GET or POST request, the information must not be visible from the URL for security reasons.
I am aware of sessions objects, however, I am not sure how I can assign the eval value when the hyperlink is clicked.
I am trying to Text='<%#Eval ("ID") %>' (ID) between webpages.
<table>
<td>
<asp:HyperLink ID="HyperLink1" runat="server"
ImageUrl="TrackingPage.aspx">
<asp:ImageButton ID="ImageButton1" runat="server" CssClass="ImageBtn"
ImageUrl="Images/TrackingImg.PNG" OnClientClick="NavigateUrl" />
</asp:HyperLink>
</td>
</tr>
<tr>
<td>
<asp:Label ID="DashboardID" runat="server" CssClass="IDTextStyle"
Text='<%#Eval ("ID") %>'></asp:Label>
</td>
</table>
Any suggestions or further reading would be appreciated.
Thanks for your help.
I would recommend you to edit your image button to <asp:ImageButton ID="ImageButton1" runat="server" CssClass="ImageBtn" ImageUrl="Images/TrackingImg.PNG" OnClick="ImageButton1_Click" CommandArgument='<%#Eval ("ID") %>'/>. You can then save id in Session like this.
protected void ImmageButton1_Click(object sender, EventArgs e)
{
var dashboardID = ((ImageButton)sender).CommandArgument;
Session["DashboardID"] = dashboardID;
// Logic to redirect to another page
}
I keep getting an error when sending a sample HTML email. I have no idea what the error means and Marketo support is stumped too. I can't send any emails until this is resolved. I have been building HTML email templates for a while now and this is the first time I have come across this.
Here is the error. An error occurred when processing the email Body!
A macro declaration requires at least a name argument near
</table></td><td valign="top" class="spacer" width="20" style
Here is the part of code it is referencing.
</table>
</td>
<td valign="top" name="spacer" class="spacer" width="20" style="border-collapse: collapse;margin: 0;padding: 0;line-height: 1px;mso-line-height-rule:exactly;font-size: 1px;"> </td>
Any help is greatly appreciated.
Browser returns me this problem:
CS1502: The best overloaded method match for 'System.Web.UI.HtmlControls.HtmlTableRowCollection.Add(System.Web.UI.HtmlControls.HtmlTableRow)' has some invalid arguments
I have no idea about the problem. I use this repeater object and table like this all the time. and it works fine with this way. But now it gives an error. Where is the problem?
thanks!!
design side
<table id="myTable" runat="server" class="table table-striped table-hover">
<asp:Repeater ID="lstBanks" runat="server" OnItemDataBound="lstBanks_ItemDataBound"
OnItemCommand="lstBanks_ItemCommand">
<ItemTemplate>
<tr>
<td>
SSSs
<asp:HiddenField ID="hfID" Value='<%#Eval("ID") %>' runat="server" />
</td>
<td>
SSS
</td>
<td>
SSS
</td>
<td>
SSS
</td>
</tr>
</ItemTemplate>
</asp:Repeater>
</table>
You shouldn't have the runat="server" attribute on your <table>, element, since you're building raw HTML for it. It's parsing that into memory as a strongly-typed table, then getting confused when you try and add a Repeater instead of a tr. Just remove that attribute and I believe it should work.
Although that all said, you might want to switch over to GridView. Each has advantages, and admittedly I prefer MVC because I can write HTML similar to what you're doing. But in WebForms, a GridView is likely preferable.
I just decided to learn Pyramid and choose Mako as template language. I got a list from view which is a raw sql result, as follow:
[{'sample': 'R1_Y200.fq', 'study': 'GaoQiang1'},{'sample': 'R1_Y300.fq', 'study': 'GaoQiang2'},...]
view.py:
#view_config(route_name='example', renderer='example.html')
def templet_test(request):
...
return {'result':search_result}
html:
<html>
...
<table border="1" width="500" align="center" cellpadding="0">
<tr>
<th >study</th>
<th >sample</th>
</tr>
% for item in result:
<tr>
<td valign=top align=center> ${item['study']} </td>
<td valign=top align=center> ${item['sample']} </td>
</tr>
% endfor
</table>
...
</html>
But it didn't work out. I got this message:
"Internal Server Error
The server encountered an unexpected internal server error
(generated by waitress)"
How to fix it?
The real exception is shown in console - it will contain the cause of your problem.
You may also want to enable debug toolbar in pyramid to have a more friendly way of error handling in development.
Also by looking at your template - and i assume you use sqlalchemy for database interaction, your probably want to access result rows like item.study , not like item['study'].
That's as much as I can guess without a proper traceback.
EDIT: A few months later I attempted this again using the same syntax I had tried the first time (posted below). For some reason, it worked! Maybe something other than my syntax was causing the ineffectiveness... END EDIT
I've been searching forums for a couple of hours now trying to find a solution to this problem, but none of the things I've tried work.
I'm using VBA to automate the process of creating a survey on SurveyMonkey. So far I've been able to:
Log into my account,
Click several hyperlinks to create a new response collector,
Name the collector,
Go to the collector settings,
And, select three of four radio buttons to change collector settings.
The issue isn't that I can't select the radio buttons; my code selects the first three buttons just fine. What puzzles me is that the fourth button doesn't change! I use the same process for each button, so I can't figure out why the last button won't select.
Here's the section of my code:
objIE.Document.getElementById("rdlResponseType_1").Click 'Allow multiple responses = Yes
objIE.Document.getElementById("rdlResponseEdit_1").Click 'Allow Responses to be Edited = Yes
objIE.Document.getElementById("rdlThankyou_1").Click 'Display a "Thank You" page? = Yes
objIE.Document.getElementById("rdlCompleteOpt_1").Click 'Survey Completion = Close Window
This is the HTML for the radio buttons:
<table border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
<tr id="CompleteOptDesc">
<td style=""> </td>
<td>After the respondent leaves the survey:</td>
</tr>
<tr id="CompleteOptItems">
<td style=""> </td>
<td align="left" nowrap="nowrap" valign="top">
<table id="rdlCompleteOpt" class="Clean radioList" OnClick="radioToggle('rdlCompleteOpt', '0', 'panLink');" name="rdlCompleteOpt" border="0" style="white-space: nowrap">
<tr>
<td><span style="white-space: nowrap"><input id="rdlCompleteOpt_0" type="radio" name="rdlCompleteOpt" value="0" checked="checked" /><label for="rdlCompleteOpt_0"><b>Redirect</b> to your own webpage.</label></span></td>
</tr><tr>
<td><input id="rdlCompleteOpt_1" type="radio" name="rdlCompleteOpt" value="2" /><label for="rdlCompleteOpt_1"><b>Close Window</b></label></td>
</tr>
</table>
Here is the code for the toggle section of the radio:
<td width="65%" valign="top">
<div id="panLink" style="DISPLAY:inline">
<div class="URLinfo">
<b>Enter a URL</b> to jump to upon leaving the survey:<br />
<div title="REQUIRED: Enter URL (255 character max)" style="padding:4px 0 2px 0;">
<input name="txtWebLink" type="text" value="http://www.surveymonkey.com/" maxlength="255" size="40" id="txtWebLink" class="RQR opaque" />
</div>
<span class="tip">Example: <u>http://www.mysite.com/home.html</u></span>
</div>
</div>
</td>
Any suggestions would be very appreciated!
There's a couple things to consider:
When are you calling this code? OnNavigate or DocumentComplete? It may be that the object doesn't exist yet. You can check to see if it does by using a breakpoint and adding a watch for the expressions
objIE.Document.getElementById("rdlCompleteOpt_1")
Use OnDocumentComplete to ensure the HTML components exist
It's possible the way you are calling the click function is causing an issue. Try this
Call objIE.Document.getElementById("rdlCompleteOpt_1").Click()
I doubt that it is likely to have much impact but I like to verify everything.
Isolate the cause of the issue by removing the 'layers'. Can you accomplish this using pure JavaScript that's invoked from the IE dev tools (F12) JavaScript console?
If no then the issue is with how you're interacting with the page elements. If yes then we need to figure out what it is with the VBA intaction is causing an issue. Again see #2 as it is likely the cause of the issue.
Also, does the issue occur if you change the HTML order of the elements? What if you call it this way?
objIE.Document.getElementById("rdlCompleteOpt_1").Click 'Survey Completion = Close Window
objIE.Document.getElementById("rdlResponseType_1").Click 'Allow multiple responses = Yes
objIE.Document.getElementById("rdlResponseEdit_1").Click 'Allow Responses to be Edited = Yes
objIE.Document.getElementById("rdlThankyou_1").Click 'Display a "Thank You" page? = Yes
Does it work then or does the "last" item fail?
Highly unlikely to be the cause but the HTML supplies is missing the code to close cell, row and table.
</tr>
</table>
<!-- missing -->
</td>
</tr>
</table>
While not the specific answer to your question I believe this may be inline with the intent of your post. Since you want to manage a surveymonkey collector take a look at the SurveyMonkey API here as using an API gives you quite a few benefits.
you don't have to rely on user elements which may change or be changed outside of your control
you can use a controlled and "contracted" interface to manage the information which covers you for any future changes (assuming they don't deprecate and stop supporting the API)