Error CS0120 - object reference

This public forum is for user-to-user discussions of ASP.NET Maker. Note that this is not support forum.

Error CS0120 - object reference

Postby dire » Thu Sep 21, 2017 5:49 pm

I want to implement solution as is writen down in help file
Ajax by Server Events and Client Scripts -> Example 1: Auto-Fill synchronously

i just change the name of sql and select it self. Everything is at it's writen.
ew_SetClientVar("MyCustomSql", ew_Encrypt("SELECT UnitPrice FROM products WHERE ProductID = {query_value}"));

any idea?
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm

Re: Error CS0120 - object reference

Postby motfs » Fri Sep 22, 2017 10:56 am

Try to modify the template file "aspxfn.cs" as follows (see the line marked with //***:

// Set client variable
//*** public void ew_SetClientVar(string name, object value) {
public static void ew_SetClientVar(string name, object value) { //***
motfs
 
Posts: 710
Joined: Tue Sep 08, 2015 4:55 pm

Re: Error CS0120 - object reference

Postby dire » Fri Sep 22, 2017 11:20 am

Yep "static" did the trick.

Thanks
dire
 
Posts: 34
Joined: Mon Sep 26, 2016 7:53 pm


Return to General Discussion (ASP.NET Maker)