Franziee
Franziee

Reputation: 649

DateTimePicker control install error

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="/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?

Upvotes: 0

Views: 3244

Answers (5)

Alexander
Alexander

Reputation: 31

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

Upvotes: 3

Todd
Todd

Reputation: 439

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>

Upvotes: 1

Gideon
Gideon

Reputation: 16

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.

Upvotes: 0

BillyZ
BillyZ

Reputation: 11

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

<handlers>

Upvotes: 1

Dave Kelly
Dave Kelly

Reputation: 11

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.

Upvotes: 1

Related Questions