Posts

Showing posts with the label Visual Studio

Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control.

Solved:  When we use conditions on Eval many times we got the error, two ways use solve this error. 1- You make a function what you needs and bind before eval Example: bool ShowAge ( int age ) { return ( age > 18) ; } and call where you use eval Visible=' <% # ShowAge(Eval("Age")) %>' 2- You make a ItemCommand event and define condition on it protected void rptUser_ItemDataBound ( object source, RepeaterCommandEventArgs e ) { TextBox txtAge = ( TextBox )e.Item.FindControl("txtAge"); if ( DataBinder .Eval(e.Item.DataItem, "Age") > 18) { txtAge.Visible = false ; } ; }

Get Web API to return plain or simple text

Often we get as a collection or object when we test API and get return to a string like a plain text or auto generated ID. It is simple to view that code  response.Content.ReadAsStringAsync().Result

The tablix 'Tablix' is invalid. The value for the DataSetName property is missing.

The tablix is invalid. The value for the DataSetName property is missing. Solved: This is simply define any datasource field to rdlc report column.its cannot be empty without any passing dataset field.

Edit code while application is debugging or run in visual studio

Go to debug tab --> Options and Settings --> Debugging --> Edit and Continue --> uncheck (Enable Edit and Continue)