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 -

java - where to store the user credentials in an enterprise application(EAI)? -

openxml - Programmatically format a date in an excel sheet using Office Open Xml SDK -