بایگانی برچسب: ASP.NET

‫‫‫‫داستان بی‌سوادی ما – ۴: Visual Studio Debugging

یکی از جاهایی که کار می‌کردم دو تا Solution خیلی بزرگ داشتیم. اولی که ۶۴ تا پروژه‌ی ویژوال استودیو بود که همگی تبدیل به dll می‌شدند و دومی که یک پروژه‌ی وب حجیم بود با چیزی بالای ۶۰۰ صفحه aspx. بعضی وقت‌ها که ایرادی پیش می‌آمد مجبور می‌شدم Solution اول را روی کامپیوتر خودم Build …

‫داستان بی‌سوادی ما – ۳: ASP.NET Membership

یکی از امکانات ASP.NET مجموعه Membership و امکانات جانبی آن است. این مجموعه به برنامه‌های ASP.NET امکان تعریف کاربر، نقش و کنترل دسترسی بر اساس آنها را می‌دهد. برای این که بتوان از این امکانات استفاده کرد بایستی موارد مورد نیاز ASP.NET applications services در بانک اطلاعاتی مورد استفاده برنامه نصب گردد. این کار به …

Paging methods

ASP.NET GridView and other similar controls that support paging needs special methods that return only the requested slice of data and  the count of total data. As I’m a lover of NHibernate/Castle ActiveRecord I have gathered paging techniques in NHibernate HQL, LINQ-to-NHibernate and Castle ActiveRecord: NHIbernate HQL: public IList GetData(int page, int pageSize, ref long …

‫Paging بدون DataSource

بیشتر کارهای کنترل‌های ASP.NET را هم می‌توان به صورت Declartive و هم در Codebehind انجام داد. یکی از این کارها عملیات Paging در GridView است. متاسفانه یک محدودیت ظریف در حالت غیر Declarative وجود دارد که کار را برای کسانی که همه کارهای کنترل‌هایشان را در Codebehind انجام می‌دهند سخت کرده است. اگر GridView را …

Castle ActiveRecord and GridView’s Paging and Sorting

Paging and sorting is a common need in ASP.NET applications. GridView itself have a default paging and sorting mechanism. Default paging has performance issues while manipulating large amounts of data. So people use a custom paging mechanism. This way they must note that only needed data must be extracted from database. For example when page …

Pros and cons of declarative data binding in ASP.NET

While binding data to ASP.NET data aware controls like GridView and FormView, there is always two choices. Firstly you can do updating, inserting and deleting operations just in code behind. This way you should reference controls, get/set values and do actual operation in codebehind. Secondly it’s possible to do almost everything in markup of your …