c# - SQLDatasource parameters problem -


why if use following instruction in code behind:

sqldatasource1.selectparameters["page"].defaultvalue = "0"; 

i 'system.nullreferenceexception: object reference not set instance of object.

'?

the 2 objects involves in single statement (bold)

sqldatasource1.selectparameters["page"].defaultvalue

sqldatasource1.selectparameters["page"].defaultvalue

so 1 of them must null. when looking @ previous question, because have not yet added "page" parameter sqldatasource1.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -