//Data Pager Outside ListView protected void lView_DataBound(object sender, EventArgs e) { dPager1.Visible = (dPager1.PageSize < dPager1.TotalRowCount); } //Data Pager Inside ListView protected void lView_DataBound(object sender, EventArgs e) { DataPager dPager = (DataPager)lView.FindControl("dPager1"); dPager.Visible = (dPager.PageSize < dPager.TotalRowCount); }
world wide web development problems asp net php html xhtml css javascript jquery w3dproblems
Wednesday, September 11, 2013
How to hide asp net DataPager when there is only one page
When you use DataPager with ListView and there is only one page of data you still see the pager. So if you don't like the pager like me you can use below piece of code to hide it.
Tuesday, September 10, 2013
How to display original quality image in Crystal Reports
Step 1:
Open any crystal report
Step 2:
Go to Menu->Crystal Report->Design->Default Settings
Step 3:
Go to Reporting Tab and make sure "Retain Original Image Color Depth" is checked
Note: Try using images with no transpareny for good quality.
Open any crystal report
Step 2:
Go to Menu->Crystal Report->Design->Default Settings
Step 3:
Go to Reporting Tab and make sure "Retain Original Image Color Depth" is checked
Note: Try using images with no transpareny for good quality.
Sunday, September 8, 2013
What is the difference between Public, Private, Protected And Internal
| Anywhere | Same class | Derived Classes | Same Assembly | Derived Classes in another assembly |
|
| Public | |||||
| Private | |||||
| Protected | |||||
| Internal | |||||
| Protected internal |
Saturday, September 7, 2013
How to reset / change user password programmatically using asp net membership
MembershipUser user = Membership.GetUser({UserId}); user.ChangePassword(user.ResetPassword(), {NewPassword});
How to restrict get; setter; to get only inside c# asp net classes
Lets say you have a get, set property inside a class say IP
public String IP { get; }
When I specify get only I wont be able to set the property even inside the class itself. e.g
this.IP = "127.0.0.1";
Property or indexer 'IP' cannot be assigned to -- it is readonlySolution, just type private keyword with set property like this
public String IP { get; private set; }All done
Subscribe to:
Posts (Atom)

