PDA

View Full Version : آموزش: نمونه برنامه هاي كوچك اما مفيد



Mostafa_Dindar
پنج شنبه 13 خرداد 1389, 00:00 صبح
سلام ،

يكي از راههاي يادگرفتن موارد جديد ، مشاهده نمونه كدها يا Sample هاي اون هست ، براي من خيلي وقتها پيش اومده كه به جاي مطالعه يك فصل كتاب يا مقاله طولاني، دوست داشته باشم ابتدا يك نمونه كد رو ببينم ، Run كنم و طرز كار اون رو مشاهده و درك كنم و بعد از روي فرصت به مطالعه جدي اون بپردازم . يا از كدهاي ديگران الهام بگيرم .

در اين تاپيك قصد دارم نمونه Source Code هاي كوچك و Task Oriented اي رو قرار بدم كه در اينترنت يافتم . از اون جايي كه خودم با زبان C#‎‎‎‎‎‎ كار كردم ، بديهيست كه سورس كدها به زبان سي شارپ باشند .

اميدوارم مورد توجه دوستان واقع بشه

اين تاپيك به مرور زمان تكميل خواهد شد و دوستان علاقه مند ديگر هم ميتونند سورس كدها رو اينجا قرار بدن .

ويرايش :
----------------------------------

اگر دوستان سوالاتشون رو اينجا مطرح نكنند ، تا پيمايش و دسترسي سهول الوصول تر بشه ، ممنون ميشم

Mostafa_Dindar
پنج شنبه 13 خرداد 1389, 00:10 صبح
استفاده از كنترل هاي Menu & SiteMapPath (http://barnamenevis.org/forum/attachment.php?attachmentid=50275&stc=1&d=1275505443)


This sample demonstrates how to use the Menu and SiteMapPath controls in ASP.NET 2.0. The Menu control can be used to create a familiar menu system for navigating your Web site, while the SiteMapPath control is used to add breadcrumb trail functionality to your web pages. A breadcrumb trail provides users of your web site a navigation path based on their current location within the site. Both of these controls are very flexible and completely customizable.

نحوه استفاده از MasterPage (http://barnamenevis.org/forum/attachment.php?attachmentid=50276&stc=1&d=1275505443)


This sample demonstrates the use of master pages in ASP.NET 2.0. Master pages provide an easy wasy of ensuring a consistent layout and look and feel to your web sites.

نحوه استفاده از كنترل TreeView (http://barnamenevis.org/forum/attachment.php?attachmentid=50277&stc=1&d=1275505443)


This sample demonstrates how to use the TreeView control in ASP.NET 2.0. The TreeView control is designed to present you with data in a hierarchical structure, where each node in the tree can be optionally collapsed and expanded (the default). The control has rich design-time features and is ideal for displaying XML data.

استفاده از Profile (http://barnamenevis.org/forum/attachment.php?attachmentid=50278&stc=1&d=1275505443)


This sample demonstrates how to use profiles in ASP.NET 2.0. Profiles can be used to easily add personalization to your web sites, for both anonymous and logged in users.
The first example shows how to create simple profile properties and use them as an anonymous user. The second example shows how to use more complex profile properties, such as a collection and a user-defined object. In the final example you see how to migrate the profile properties from your anonymous user token to your logged in (authenticated) username.


تكنيكهاي مختلف Cache كردن براي بالا بردن كارايي Application (http://barnamenevis.org/forum/attachment.php?attachmentid=50279&stc=1&d=1275505443)


This sample demonstrates a couple new techniques for caching data in ASP.NET 2.0: by setting the cache properties directly on a SqlDataSource control and by using the SqlCacheDependency class to enable cache notifications.

Mostafa_Dindar
پنج شنبه 13 خرداد 1389, 00:23 صبح
از اونجايي كه در هر پست نميتونم بيشتر از 5 مورد آپلود كنم ، مجبورم در پستهاي متفاوت اينكار رو انجام بدم .

MemberShip API در ASP.NET 2.0 مديريت كاربران و نقشها (http://barnamenevis.org/forum/attachment.php?attachmentid=50281&stc=1&d=1275506046) ( اين مورد رو بچه ها خيلي سوال دارند )


This sample demonstrates how to programmatically use methods from the new Membership API in ASP.NET 2.0 to manage users and their roles.
The sample consists of a Web site with secure and unsecure areas. The only built-in security control that is the the Login control. The goal was to show how to do various tasks using the Membership and Roles APIs.
This sample comes with four roles: Administrator, Contractor, Employee and Manager. Each role has its own folder within the site for protected pages, and each folder has its own web.config file to enforce restricted access to those pages. View the respective web.config files to see which roles have access to which folders.



استفاده از كنترلهاي MemberShip (http://barnamenevis.org/forum/attachment.php?attachmentid=50282&stc=1&d=1275506046)
( كنترلهاي Login, LoginStatus, LoginName, LoginView, CreateUserWizard, ChangePassword, and PasswordRecovery)


This sample Web site shows how to use the new membership controls in ASP.NET 2.0, which are: Login, LoginStatus, LoginName, LoginView, CreateUserWizard, ChangePassword, and PasswordRecovery.
The sample is set up with Forms authentication to restrict access to the pages found in the Members directory; therefore, to get access to the members-only pages, you must create a new user and then login with that user account. Once logged in, other options are made available to you, such as viewing the secure page and changing your password.


استفاده از كنترلهاي GridView & DetailsView (http://barnamenevis.org/forum/attachment.php?attachmentid=50283&stc=1&d=1275506046)

This sample demonstrates the use of new data controls in ASP.NET 2.0: the GridView control and the DetailsView control.
There are two examples in this sample. The first example shows you how to bind to a SqlDataSource control and add paging and sorting capabilities to your GridView control. The second example shows how to create a master/detail page using both the GridView and DetailsView controls.



استفاده از كنترلهاي دسترسي به داده يا DataAccess Control (http://barnamenevis.org/forum/attachment.php?attachmentid=50284&stc=1&d=1275506046)

كنترلهاي SqlDataSource , ObjectDataSource و XmlDataSource


This sample demonstrates how to use the new data source controls in ASP.NET 2.0. Covered in this sample are the SqlDataSource control, the XmlDataSource control, and the ObjectDataSource control.

استفاده تعدادي از كنترلهاي Web Part (http://barnamenevis.org/forum/attachment.php?attachmentid=50285&stc=1&d=1275506046)


This sample demonstrates some of the new Web Parts controls and features of ASP.NET 2.0.
There are two parts to this sample. The first part shows how to use and customize WebPartZone controls to create a basic site layout. The second part demonstrates how to personalize a web part with a standard user control.

Mostafa_Dindar
پنج شنبه 13 خرداد 1389, 00:56 صبح
آپلود عكس توسط FileUpload و همزمان ايجاد كردن يك Thumbnail از آن به صورت اتوماتيك (http://barnamenevis.org/forum/attachment.php?attachmentid=50287&stc=1&d=1275507765)

آپلود فايل و Delete كردن فايل در Server (http://barnamenevis.org/forum/attachment.php?attachmentid=50290&stc=1&d=1275508199)

آپلود عكس و ذخيره اون در ديتابيس (http://barnamenevis.org/forum/attachment.php?attachmentid=40574&d=1259666846)

كار كردن بادايركتوري و فايلها ( ايجاد ، حذف ، جابجايي Directory و فايلها ) در سرور (http://barnamenevis.org/forum/attachment.php?attachmentid=50291&stc=1&d=1275508938)

آپلود فايل به صورت Ajax اي همراه با Progress Bar ( اين يكي 600 كيلو ، حايي ديگه آپلود شده) (http://www.persianupload.com/5449092)




(http://www.persianupload.com/5449092)

mohitlog
پنج شنبه 13 خرداد 1389, 09:01 صبح
یک کنترل برای تاریخ فارسی که فکر کنم عالی باشه

PersianCalendar WebControl Using With AJAX.NET & AjaxControlToolkit (http://www.barnamenevis.org/forum/PersianCalendar%20WebControl%20Using%20With%20AJAX .NET%20&%20AjaxControlToolkit)

Mostafa_Dindar
پنج شنبه 13 خرداد 1389, 11:15 صبح
اضافه كردن متن به عكس به صورت دايناميك با استفاده از DataBase و HttpHandler به زبان C#‎‎‎‎‎‎‎‎ & VB (http://barnamenevis.org/forum/attachment.php?attachmentid=50303&stc=1&d=1275545575)

استفاده از كنترل AdRotator به صورت Ajax اي (http://barnamenevis.org/forum/attachment.php?attachmentid=50304&stc=1&d=1275545575)

َAccordion Panel , Tips and Tricks (http://www.persianupload.com/7703055)

استفاده از Progress Bar در Ajax با استفاده از PageRequestManager و UpdatePanelAnimation و UpdateProgress (http://www.persianupload.com/3836098)

Sort كردن آيتم هاي DropDownList (http://barnamenevis.org/forum/attachment.php?attachmentid=50305&stc=1&d=1275546281)

ModalPopup (http://barnamenevis.org/forum/attachment.php?attachmentid=50306&stc=1&d=1275546535)


.

vbnovin
شنبه 29 خرداد 1389, 14:03 عصر
درباره آپلود فایل و دانلود فایل بطور مستقیم به IP یک شماره پورت مشخصی لطفا مثالی بگذارید vb.net و asp .... تقریبا مانند ایمیل عمل کند و فایل را به گیرنده در یک دیتا بیس با یک فایل ضمیمه در دسترس قرار دهد یا با یک آلارمی نشان دهد که فایلی رسیده است ممنونم اگر کمک کنید .......... ؟؟؟؟

ممنونم

hashemi85sep
یک شنبه 30 خرداد 1389, 12:56 عصر
سلام خدمت اساتید
فکر کنم این هم بدرد دوستانی میخوره که با vb کار میکنن

این آدرس کد های #c رو به vb بالعکس تبدیل میکنه ..

http://www.developerfusion.com/tools/convert/vb-to-csharp/

Mostafa_Dindar
یک شنبه 30 خرداد 1389, 15:42 عصر
سلام ,

حتما اطلاع دارید که jQuery یک کتابخانه Open source و رایگان Java Script ای هست که سر وصدای زیادی به پا کرده .

از سویی برنامه نویسان ASP.NET که با کنترل های ServerSide از ASP.NET کار میکنند , شاید واسشون راحت نباشه که با این کتابخانه جاوا اسکریپی Client Sideکار کنند .


کتاب
51 Tips, Tricks and Recipes with jQuery and ASP.NET Controlsمنبع خیلی خوبی برای یادگیری و استفاده از jQuery در ASP.NET هست , که 51 مثال خوب و جالب در این زمینه ارائه کرده , این مثالها به صورت خودآموز و ساده هستند .

http://www.barnamenevis.org/forum/attachment.php?attachmentid=51506&stc=1&d=1277030272

مثالها شامل چندین قسمت است :


Section1-TextBox
Section2-CheckBox
Section3-RadioButton
Section4-Panels
Section5-DropDownList
Section6-GridView
Section7-ImageControl
Section8-BulletedList
Section9-Hyperlink
Section10-JSONAJAX
jQueryWithMasterPageSample

کد ها رو میتونین از اینجا دانلود کنید (http://www.persianupload.com/1328963)حجم 523 کیلو بایت

سربلند باشید

Mostafa_Dindar
پنج شنبه 10 تیر 1389, 23:09 عصر
لینک باز نمیشه....!!!!


بله ؛
متاسفانه لینک مشکل دارد.

من اون لینک رو معرفی نکرده بودم , ولی بهر حال فکر میکنم منظور دوستمون این لینک بوده :

PersianCalendar WebControl Using With AJAX.NET & AjaxControlToolkit (http://www.codeproject.com/KB/custom-controls/PersianCalendarControl.aspx)



سربلند باشید

Mostafa_Dindar
چهارشنبه 20 مرداد 1389, 15:14 عصر
ایجاد متا تگ به صورت داینامیک برای سایت با استفاده از LINQ To XML
(http://www.barnamenevis.org/forum/attachment.php?attachmentid=53985&stc=1&d=1281521593)
ایجاد متاتگ به صورت داینامیک برای سایت با استفاده از LINQ TO SQL (http://www.barnamenevis.org/forum/attachment.php?attachmentid=53986&stc=1&d=1281521593)

hashemi85sep
شنبه 06 شهریور 1389, 01:32 صبح
سلام دوستان
اینم یه تکه برنامه برای کار کردن با DataList که Id سطری رو که انتخاب شده میگره و به صفحه بعد ارسال میکنه و در صفحه بعد نمایش میده