|
I want to use asp.net ajax in one of my existing asp.net 2.0 web application (asp.net website). At first i`ve changed the existing web.config file and changed it to make compatible with ajax.
Changed web.config file is as follows:
=============================================================================
<?xml version="1.0"?>
<configuration>
<configSections>
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication" />
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<system.web>
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="false">
<assemblies>
<add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</assemblies>
</compilation>
<httpHandlers>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</httpModules>
</system.web>
<system.web.extensions>
<scripting>
<webServices>
<!-- Uncomment this line to customize maxJsonLength and add a custom converter -->
<!--
<jsonSerialization maxJsonLength="500">
<converters>
<add name="ConvertMe" type="Acme.SubAcme.ConvertMeTypeConverter"/>
</converters>
</jsonSerialization>
-->
<!-- Uncomment this line to enable the authentication service. Include requireSSL="true" if appropriate. -->
<!--
<authenticationService enabled="true" requireSSL = "true|false"/>
-->
<!-- Uncomment these lines to enable the profile service. To allow profile properties to be retrieved
and modified in ASP.NET AJAX applications, you need to add each property name to the readAccessProperties and
writeAccessProperties attributes. -->
<!--
<profileService enabled="true"
readAccessProperties="propertyname1,propertyname2"
writeAccessProperties="propertyname1,propertyname2" />
-->
</webServices>
<!--
<scriptResourceHandler enableCompression="true" enableCaching="true" />
-->
</scripting>
</system.web.extensions>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</modules>
<handlers>
<remove name="WebServiceHandlerFactory-Integrated" />
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode"
type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>
</system.webServer>
</configuration>
=============================================================================
After that i run the project and it works well but when i publish the website and installed it on a different computer it generates the following error when it try to open the page in browser:
=============================================================================
Server Error in '/WebSite1' Application.
--------------------------------------------------------------------------------
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: Unrecognized attribute 'type'.
Source Error:
Line 2: <configuration>
Line 3: <configSections>
Line 4: <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
Line 5: <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
Line 6: <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
Source File: D:\WebSite\web.config Line: 4
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
=============================================================================
Please help. And also let me know if you need some more information
|
|
|
|
|
Did you develop the site using .NET 1.1 ? I thought ATLAS was 2.0 only ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I`ve used asp.net 2.0 which is mentioned in my post as "existing asp.net 2.0 web application".
|
|
|
|
|
OK, then this is your problem:
--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.573
=============================================================================
From the error info you posted. Install .NET 2.0 on the server.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i've written the following code. it doesn't yet do what it needs to i'm just getting the events set up at the moment. what's meant to happen is that the controls are paired so we have xxxxCyyyy and xxxxDyyyy where xxxx and yyyy could be any alpha text. onblur from xxxxCyyyy some things have to be done to xxxxDyyyy. basically there's a reversible function that describes the relationship between the values contained in the two controls, if you enter data in one, the other should be calculated and the cell disabled.
function RegisterAmountValidation()<br />
{<br />
var form = document.forms[0];<br />
for(i = 0;i < form.elements.length;i++)<br />
{<br />
var controlId = form.elements[i].id;<br />
if (controlId.substring(0,7) == 'jed_amt')<br />
{<br />
var suffix = controlId.substring(9);<br />
var targetControl = '';<br />
<br />
if(controlId.substring(7,8)=="C")<br />
{<br />
targetControl = controlId.substring(0,7) + "D" + suffix;<br />
}<br />
else<br />
{<br />
targetControl = controlId.substring(0,7) + "C" + suffix;<br />
}<br />
alert (controlId + " | " +targetControl );<br />
form.elements[i].onblur = function() {Validate(targetControl);};<br />
}<br />
}<br />
}<br />
function Validate(cellToEffect)<br />
{<br />
alert(cellToEffect);<br />
}<br />
window.onload = RegisterAmountValidation;
this line of code shows what i would expect
alert (controlId + " | " +targetControl );
however when i exit a control on the form only the one that was registered last gets fired and it gets fired for every control. Have i misunderstood JS events?
Thanks
Russell
|
|
|
|
|
i found a much better way of doing this using:
form.elements[i].onblur = function(e) {Validate(e);};
and then mining out the target this works really well for me.
Now my javascript adventures continue...
Russell
|
|
|
|
|
hi all,
how to make visible true/false of a server control by using javascript. plz any one help me its urgent.
Pradeep Reddy
|
|
|
|
|
pradeep kumarappagari wrote: plz any one help me its urgent.
Isn't it always ?
You can't, at least not if you set visible to false. In this case, it won't even be rendered. Set the style to display:none for invisible and display inline ( or block, or even empty string ) to show it, but you must have visible set to true, or it won't go to the client at all.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
document.getElementById("Id of the Control").Property = Value
It can be enabled or visible property
Gautham
|
|
|
|
|
document.getElementById("controlID").style.visibility = 'visible'
document.getElementById("controlID").style.visibility = 'hidden'
Regards,
Sylvester G
sylvester_g_m@yahoo.com
|
|
|
|
|
thank u
Pradeep Reddy
|
|
|
|
|
Hi!
I need to control the users running one asp application. The application can run only by one user at a time. I'm thinking ASP.NET application that user gomes and the application informs that there is 2 or 3 in line to run the asp application. Then the user can add it's own info to run on that asp application. What is good idea to do this?
I'm bit horry about this! Thanks!
|
|
|
|
|
I'd recommend writing your app properly so it can run with multiple users. Why would you need to limit it ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
The asp application is old and it makes pdf book from diffrent pdf files. And the asp application is not working properly when many users are buildin the pdf book at the sametime. The asp is so big that I dont want to write it all over in asp.net. The reason to the crass is not sorten because, waiting for sometime and trying to build it agen it build it correctly.
|
|
|
|
|
Hi,
I checked out a couple of articles on customising the login control, and for the username and password controls they use a ValidationGroup="Login1". Does it have to be Login1, or can I name the value of this property to anything I want?
The reason why I ask is because I have to set the username and password control IDs to UserName and Password respectively.
ma se
|
|
|
|
|
Hello all
Is there any way to change the textbox value in fileupload control dynamically through asp.net
Thanks
|
|
|
|
|
At what point do you want to change the text, and why ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
below is the value assigned to the href property of Anchor Tag in the Design mode.
href="ToolDescription.aspx?ToolId='<%#Eval("ToolID")%>'"
Here, I am passing the value ToolId to the next page using URL. Also ToolID is the Column name in my Dataset.
Error message: The server tag is not well formed.
How can I solve it in Design mode itself?
Regards,
Jay
|
|
|
|
|
Did you include runat="sever" ?
|
|
|
|
|
Yes Colin,
Beolw is the complete tag,
<a id="lnkToolDetails" href="ToolDescription.aspx?ToolID='<%#Eval('ToolID')%>'" runat=server><%#Eval("ToolFullName")%></a>
Regards,
Jay
|
|
|
|
|
This might work:
id="lnkToolDetails" href="ToolDescription.aspx?ToolID=<%#Eval('ToolID')%>" runat=server><%#Eval("ToolFullName")%>
or
id="lnkToolDetails" href='ToolDescription.aspx?ToolID=<%#Eval("ToolID")%>' runat=server><%#Eval("ToolFullName")%>
|
|
|
|
|
Hi,
I have already tried both, but no result. It wont give any syntax error. But it wont pass the right value in URL.
Regards,
Jay
|
|
|
|
|
You should probably add a new coulmn in your dataset, that contains the hole
path.
Couse the nesting of " and ' you have got, won't work.
Hope it helps
Thomas
|
|
|
|
|
href='<%# ToolDescription.aspx?ToolId= + Eval("ToolID") %>'
Try out
Gautham
|
|
|
|
|
gauthee wrote: href='<%# ToolDescription.aspx?ToolId= + Eval("ToolID") %>'
I made a small change. It works fine. Thanks Gautham.
href='<%# "ToolDescription.aspx?ToolId=" + Eval("ToolID") %>'
Regards,
Jay
|
|
|
|
|