Solved

Error after converting from C# to VB

Posted on 2015-01-21
8
239 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
  • 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now