I am trying to read a post variable and I get this error:
0x80004005 - unknown exception
The line causing it:
request("total"))
I read something about permissions may be causing it, tried to implement, but it is still happening.
UPDATE:(added full code)
<%#LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form4" name="form4" action="url" method="post">
<%
total=request("total")
%>
</form>
</body>
</html>
Check your post data's length, if too large , then 'unknown exception' occurs.
FYR: http://www.bigresource.com/ASP-Max-Char-Length-of-POST-variable-8cxQFVTf.html
Related
I'm using MonoDevelop on Ubuntu to create ASP.NET pages. My code is producing syntax errors.
<%# Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head runat="server">
<title>index</title>
<script runat="server"></script>
</head>
<body>
<form id="form1" runat="server">
<p>Hello Word!</p>
</form>
</body>
</html>
1:/home/ublinuxyu/program/c#/index.aspx(0,0): Error CS1525: Unexpected symbol `<' (CS1525) (index)
2:/home/ublinuxyu/program/c#/index.aspx(4,4): Error CS1646: Keyword, identifier, or string expected after verbatim specifier: # (CS1646) (index)
What have I done wrong here?
It looks like you set the build action of the aspx file to "Compile" instead of "Content".
You can fix it using the context menu on the file in the solution pad, or by using the property pad when that file is selected.
I have a ASP.NET page what I got at the moment is
<%# Page Language="C#" AutoEventWireup="true" CodeBehind="RedirectMeNow.aspx.cs" Inherits="abc.eyd._12.TEMPLATE.LAYOUTS.RedirectMeNow" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>
how can I redirect a user back from where he came from here, not in code behind like here
Redirecting back from where user came from in ASP.NET User Control
OR I just want a ASP.NET page that redirects user on call
To avoid using code-behind, you have to use a client-side Javascript function:
window.history.back();
You can either bind it to an event or execute it during page load.
EDIT:
If u want to make this page a redirect-only page, you can add this code to your tag:
<head>
....
<script type="text/javascript>
window.history.back();
</script>
</head>
It will be executed as soon as page is getting loaded.
That's it!
I’m playing with implicit localization on my Win7 box via VS2010 and something doesn’t quite seem right. I have a trivial page where I set the resourceKey of my GO Button to “bnGO”:
<%# Page Language="VB" culture="auto" meta:resourcekey="PageResource1" uiculture="es" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Implicit Localization</title>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="bnGO" runat="server" meta:resourcekey="bnGO" />
</form>
</body>
</html>
Then I have both testForm.aspx.resx and testForm.es.aspx.resx files that set the value of bnGO.Text appropriately:
When I run the application, the GO Button displays the "Go Forth!" text defined in the default testForm.aspx.resx even though testForm.aspx has uiculture set to “es” (which I think is Spanish).
What am I doing wrong?
The name of the file should be:
testForm.aspx.es.resx
Not
testForm.es.aspx.resx
Am using JSF 1.2 and am trying to implement Captcha as per this link
So, my first objective is to get "Hello world" text using t:outputText to check if Tomahawk is working fine or not. My JSF 1.2 based Servlet deploys fine in Jboss AS 5.1.0. But, when I hit my Servlet, nothing is getting displayed on the page. Nor there are any Exceptions in the logs.
Below is my xhtml page code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:t="http://myfaces.apache.org/tomahawk">
<ui:composition>
<head>
<title>CAPTCHA</title>
</head>
<body>
<h:form id="captchatest">
<t:outputText value="This text is coming from tomahawk"></t:outputText>
</h:form>
</body>
</ui:composition>
</html>
Am using below jars in WEB-INF/lib
batik-awt-util-1.6-1.jar,
batik-ext-1.6-1.jar,
batik-gui-util-1.6-1.jar,
batik-util-1.6-1.jar,
commons-beanutils.jar,
commons-codec-1.3.jar,
commons-collections.jar,
commons-digester.jar,
commons-el-1.0.jar,
commons-fileupload-1.2.1.jar,
commons-io-1.3.2.jar,
commons-logging.jar,
commons-validator.jar,
el-ri.jar,
itext-1.4.8.jar,
jsf-api-1.2_13.jar,
jsf-facelets-1.1.15.B1.jar,
jsf-impl-1.2_13.jar,
myfaces.jar,
oro-2.0.8.jar,
standard-1.1.2.jar,
tomahawk-1.1.6.jar
I have below entry in faces-config.xml
<application>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<locale-config />
</application>
When I view the page source in Browser, I just get whatever contents are there in my xhtml page instead of Tomahawk tags (t:outputText) getting parsed to HTML code.
Why am I not able to print the value of t:outputText in Browser?
Regards,
I solved it by removing these jars
el-ri.jar, oro-2.0.8.jar and standard-1.1.2.jar
And I added this in xhtml page
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
Looking for an better understanding of how an mvc project should define javascript and css includes. I'm working with sample code where includes are defined like:
<head id="Head1" runat="server">
<title><asp:ContentPlaceHolder ID="TitleContent" runat="server" />Affiliate Checkout</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="pragma" content="no-cache">
<script type="text/javascript" src="/Scripts/jquery.js"></script>
<script type="text/javascript" src="/Scripts/jquery-ui-1.7.2.custom.min.js"></script>
.
.
.
<asp:ContentPlaceHolder runat="server" ID="HeadContent"></asp:ContentPlaceHolder>
</head>
I'm reading that to be that _all pages looking at this MasterPage will get jquery and jqueryUI and, additionally, each page will have the opportunity to add head elements thankx to the content placeholder HeadContent tag.
The specific problem i'm troubleshooting is an instance where my rendered page is not including the 'prama no-cache' tag - as you see, it's defined in the upper level header section. Other .js and .css elements are making it into the rendered page so it very confusing to see that the no-cache tag isn't.
When execute a 'View Generated Source' - the 'charset' is present the 'no-cache' is not.
Could it be because the pragma meta tag is not closed properly?