开发者

DateTimePicker control install error

开发者 https://www.devze.com 2022-12-22 05:58 出处:网络
I have a question about a third-party DateTimePicker control. I\'ve downloaded the dll and paste the appropriate web.config lines.

I have a question about a third-party DateTimePicker control. I've downloaded the dll and paste the appropriate web.config lines. I've put the control into the aspx page. When I load the page an alertbox appears:

No «add verb="GET" path=开发者_StackOverflow"/JavascriptDateTimeFormat.axd" /» httpHandler.

The control's textbox and the buttons are present but does nothing.

Part of my web.config is:

<pages>
  <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
    <add tagPrefix="mark" assembly="Mark.Web.UI.WebControls.DateTimePicker" namespace="Mark.Web.UI.WebControls"/>
  </controls>
</pages>
<httpHandlers>
  <remove verb="*" path="*.asmx" />
  <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
  <add verb="GET" path="/helpdeskweb/JavascriptDateTimeFormat.axd" type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"/>
</httpHandlers>

What should I do?


Just omit the name="JavascriptDateTimeFormat" and everything should work. The added line in IIS7 is:

<add verb="GET" path="JavascriptDateTimeFormat.axd"
  type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"/>

Alexander


If this is for IIS7, you need to change it slightly. In this case, you need to put the following line in the section of the subsection:

<add name="JavascriptDateTimeFormat" verb="GET" path="JavascriptDateTimeFormat.axd" type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"/>

It's nearly the same, but the syntax and location is slightly different.


He didn't specify, but you need to put it in the

<handlers>


This is the complete solution to this problem. It's best to have sections for IIS6 AND IIS 7:

<configuration>
  <system.webServer>
    <handlers>
      <add name="JavascriptDateTimeFormat" verb="GET" path="JavascriptDateTimeFormat.axd" type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"/>
    </handlers>
  </system.webServer>
  <system.web>
    <httpHandlers>
      <add verb="GET" path="/JavascriptDateTimeFormat.axd" type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"/>
    </httpHandlers>
  </system.web>
</configuration>


Add this entry into web.config between HttpHandlers tag

add verb="GET" path="JavascriptDateTimeFormat.axd" type="Mark.Web.UI.JavascriptDateTimeFormat, Mark.Web.UI.WebControls.DateTimePicker"

make sure the path is as mention in bold.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号