How to use .NET Connector

Hello all!

I am currently working on a ASP.Net MVC application using DhtmlxScheduler.
As of now I have been using the “scheduler.toXML()” to save my user data.

I have a new requirement to handle many users interacting with the system simultaneously, and dealing with large amounts of data. For me to fulfill this requirement, I have decided to integrate my site with a database.

Currently I have a database, with the same fields as the events (id, text, start & end times and some custom fields that I configured for the scheduler).

I am wondering how to connect to this database. While viewing the documentation, all the examples seem to reflect a .php example, I would like some insight into doing this for a .NET environment.

I am wondering what I have to replace for a .NET context.
Any help would be greatly appreciated!
Thank you for your time.

[code]scheduler.init(‘scheduler_here’, new Date(), “month”);
scheduler.load(“events.php”);

var dp = new dataProcessor(“events.php”);
dp.init(scheduler);[/code]

[code]//events.php
include(‘connector-php/codebase/scheduler_connector.php’);//includes the file

$res=mysql_connect(“localhost”,“root”,"");//connects to the server with our DB
mysql_select_db(“sampleDB”);//connects to the DB.‘sampleDB’ is the DB’s name

$calendar = new schedulerConnector($res);//connector initialization
$calendar->render_table(“events”,“id”,“event_start,event_end,text”,“type”);[/code]

Hi,
currently connector can write the http output only directly to the HttpResponse object.
So in case you use it in ASP.NET MVC project, you can define an Action with ‘void’ return type and create connector there.
Since the MVC Controller uses HttpRequestBase/HttpResponseBase classes which are not compatible with the Connector, you’ll have to retrieve HttpRequest/HttpResponse instances manually from the application object

[code]public void ConnectorAction()
{

var connector = new dhtmlxSchedulerConnector(
“Events”//table name
, “EventID”//primary key column
, dhtmlxDatabaseAdapterType.SqlServer2005// fixed value for MSSql server
, ConfigurationManager.ConnectionStrings[“SamplesDatabase”].ConnectionString// connection string
, “FromDate”// ‘start date’ column
, “ToDate” // ‘end date’ column
, “Subject as text, Details as details, Tags, Custom”// other data columns
);

//System.Web.HttpContext.Current;
var baseContext = this.HttpContext;
var context = baseContext.ApplicationInstance.Context;

connector.ProcessRequest(context.Request.QueryString, context.Request.Form);
connector.RenderResponse(context.Response);
}[/code]

Initialization of the connector
docs.dhtmlx.com/connector__net__ … serverside

@Aliaksandr

Thank you for such a hasty reply!
I will do as you suggested and read more into this “HttpRequest/HttpResponse” within ASP.Net.