Solved

Error after converting from C# to VB

Posted on 2015-01-21
8
250 Views
Last Modified: 2015-01-23
Trying to install a 3rd-part application.  The code supplied in the documentation is C#.  I converted it to VB at www.telerik.com.

After pasting it into data.ashx.vb, the IHttpHandler and the SchedulerDataContext have errors.

See screen shot --> http://screencast.com/t/ubhO2SwfvL9

Here is the C# code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
 
using DHTMLX.Scheduler.Data;
 
namespace SchedulerNetAsp
{
   public class Data : IHttpHandler
    {
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/json";// the data comes in JSON format
            context.Response.Write(
                new SchedulerAjaxData(new SchedulerDataContext().Events) //events for loading to scheduler
                );
        }
 
        public bool IsReusable { get { return false; }}
    }
}

Open in new window

0
Comment
Question by:rrhandle8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 12

Expert Comment

by:FarWest
ID: 40563272
did you add dhtmlx dll  reference to project references?
0
 

Author Comment

by:rrhandle8
ID: 40563286
Yes.  I added it in a previous step.
0
 
LVL 13

Assisted Solution

by:Jesus Rodriguez
Jesus Rodriguez earned 334 total points
ID: 40563317
You need to properly do the code in this line
Public Sub ProcessRequest(context As HttpContext)

Open in new window

it needs to be like this
 
Public Sub ProcessRequest(context As HttpContext) Implements IHttpHandler.ProcessRequest

Open in new window



look at this page and has similar code like your needs
http://blog.scheduler-net.com/post/DHTMLX-Scheduler-NET-in-Visual-Basic.aspx
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:rrhandle8
ID: 40563336
Adding "Public" did do anything.  Ya, they have VB samples, and none of them compile.  Support is next to nothing.  A very frustrating week trying to install this thing.  Beginning to think it is company to stay away from.  I post a project asking someone to get this installed for me.  Wow!  The quotes were around $700 to getting the sample site running.  Do you know any makers of a Scheduler for VB.Net?
0
 
LVL 13

Accepted Solution

by:
Jesus Rodriguez earned 334 total points
ID: 40563346
Telerik do a great schedule for ASP>NET but is expensive to get the collection but it worth it to get the whole dev craft. Will be amazing and has a well documented examples and videos, but is your willing to work a little more you can check this code (is on C# but you can convert to vb.net)
http://www.codeproject.com/Articles/591271/A-Simple-Scheduler-in-Csharp
0
 
LVL 12

Assisted Solution

by:FarWest
FarWest earned 166 total points
ID: 40563358
if it is working in c# , why not keeping it in c# and build a library project that can be called from you vb project
0
 
LVL 13

Expert Comment

by:Jesus Rodriguez
ID: 40563378
you can do that too as FarWest recommend
0
 

Author Comment

by:rrhandle8
ID: 40567844
It appears the biggest problem here is not VB vs C#, but MVC vs webforms.  There is no documentation for Webforms.  They offer their services for a price, so I asked them to install it.  No answer after 48 hours.  I'll hire someone to do this.

Thank you for your help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question