ASP.NET Web Form Dinamik Nesne Oluşturma ve Erişme

755 views
Skip to first unread message

Serkan AYTIN

unread,
Mar 18, 2014, 8:57:28 AM3/18/14
to altdotne...@googlegroups.com
Merhabalar,

Son kullanıcının anketleri ve soruları kendisinin oluşturacağı bir anket sistemi (https://tr.surveymonkey.com/ gibi) yapmayı düşünüyorum. Anket sistemi dinamik olarak Database den beslenecek. Farklı soru türlerini ekranda gösterecek. (Checklist, Radio Btton, TextBox vb.)

En basit örneğiyle şuan,

CheckBoxList checklist = new CheckBoxList
		{
			ID = "checkbox",
			RepeatDirection = RepeatDirection.Horizontal
		};

	checklist.Items.Add(new ListItem("chc1"));
	checklist.Items.Add(new ListItem("chc2"));
	checklist.Items.Add(new ListItem("chc3"));
	checklist.Items.Add(new ListItem("chc4"));

	form1.Controls.Add(checklist);

şeklinde ekleyip sonrasında da FindControl ile oluşturduğum nesnelere ulaşıyorum.

Sizler böyle bir sistem kurmak isteseniz bu işlemleri nasıl yaparsınız? Daha yenilikçi ve dinamik oluşturup ulaşması daha kolay olan yöntemler nelerdir.

Teşekkürler.

Sidar Ok

unread,
Mar 18, 2014, 9:04:03 AM3/18/14
to altdotne...@googlegroups.com
MVC kullan, modelinden UI ini olu$tur.


--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturki...@googlegroups.com.
To post to this group, send email to altdotne...@googlegroups.com.
Visit this group at http://groups.google.com/group/altdotnetturkiye.
For more options, visit https://groups.google.com/d/optout.



--
Sidar Ok

http://www.sidarok.com
http://www.twitter.com/sidarok
http://be.linkedin.com/in/sidarok

http://www.coachius.com - Connect, Inspire. Transform!

Emre Mert Asyalıoğlu

unread,
Mar 18, 2014, 12:25:02 PM3/18/14
to Alt.Net Türkiye Google Group
+1000 :)


18 Mart 2014 15:04 tarihinde Sidar Ok <sid...@gmail.com> yazdı:



--
Emre Mert Asyalıoğlu

Serkan AYTIN

unread,
Mar 19, 2014, 12:23:56 AM3/19/14
to altdotne...@googlegroups.com
MVC tarafına çok hakim değilim, fakat öğrenmek gerekli sanırım artık. 

Teşekkürler arkadaşlar.



18 Mart 2014 Salı tarihinde, Emre Mert Asyalıoğlu <easya...@gmail.com> yazdı:
+1000 :)


18 Mart 2014 15:04 tarihinde Sidar Ok <sid...@gmail.com> yazdı:
MVC kullan, modelinden UI ini olu$tur.


2014-03-18 13:57 GMT+01:00 Serkan AYTIN <serka...@gmail.com>:

Merhabalar,

Son kullanıcının anketleri ve soruları kendisinin oluşturacağı bir anket sistemi (https://tr.surveymonkey.com/ gibi) yapmayı düşünüyorum. Anket sistemi dinamik olarak Database den beslenecek. Farklı soru türlerini ekranda gösterecek. (Checklist, Radio Btton, TextBox vb.)

En basit örneğiyle şuan,

CheckBoxList checklist = new CheckBoxList
		{
			ID = "checkbox",
			RepeatDirection = RepeatDirection.Horizontal
		};

	checklist.Items.Add(new ListItem("chc1"));
	checklist.Items.Add(new ListItem("chc2"));
	checklist.Items.Add(new ListItem("chc3"));
	checklist.Items.Add(new ListItem("chc4"));

	form1.Controls.Add(checklist);

şeklinde ekleyip sonrasında da FindControl ile oluşturduğum nesnelere ulaşıyorum.

Sizler böyle bir sistem kurmak isteseniz bu işlemleri nasıl yaparsınız? Daha yenilikçi ve dinamik oluşturup ulaşması daha kolay olan yöntemler nelerdir.

Teşekkürler.

--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturki...@googlegroups.com.
To post to this group, send email to altdotne...@googlegroups.com.
Visit this group at http://groups.google.com/group/altdotne



--
Emre Mert Asyalıoğlu

İbrahim ATAY

unread,
Mar 19, 2014, 2:31:08 AM3/19/14
to altdotne...@googlegroups.com
Benim düşüncem böyle dinamik yaratımın tamamını server tarafında gerçekleştirme. Bunu yerine services üzerinde bilgi alarak, client tarafta javascript ile bunları oluşturabilirsin. Bu sayede hem performas hemde kullanıcı deneyimi yaşatma sürecinde daha iyi sunuçlar alabilirsin.
 
Ve unutmadan MVC üzerinde geliştirmeni önerim.
--
İbrahim ATAY 
Consultant, PMI-ACP, NLP | Windows Azure Insiders

Blog : www.ibrahimatay.org  | Twitter : @ibrahim_atay  | Linkedin : @ibrahimatay

Serkan AYTIN

unread,
Mar 19, 2014, 3:26:27 AM3/19/14
to altdotne...@googlegroups.com
Client tarafında oluşturup, yine servisle client tarafından JS ile mi post edeyim? Dediğiniz mantıklı geldi hocam WebApi ile soru, soru tipi vb değerleri sağlayıp elemanları oluşturup sonrasında da post ettireyim.


19 Mart 2014 08:31 tarihinde İbrahim ATAY <ata...@gmail.com> yazdı:

Fikret AKIN

unread,
Mar 19, 2014, 3:48:45 AM3/19/14
to altdotne...@googlegroups.com
5 adet Dropdownlist, 4 adet checkbox ekleyip, bunların ID değerlerini kod tarafında biliyorsan JS ile bunlara özel webmethod veya api ile bağlarsan işin daha kolay olur.


19 Mart 2014 09:26 tarihinde Serkan AYTIN <serka...@gmail.com> yazdı:



--
 

 

İyi Çalışmalar,

 

Fikret AKIN

GSM: 0534 700 75 19
Personal web: www.fikretakin.com

oguzh4n

unread,
Mar 19, 2014, 8:23:12 PM3/19/14
to altdotne...@googlegroups.com
knockout.js, backbone, angularjs gibi kütüphaneleri araştırmanı tavsiye ederim

19 Mart 2014 Çarşamba 09:26:27 UTC+2 tarihinde Serkan Aytın yazdı:
Teşekkürler arkadaşlar.

+1000 :)


To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturkiye+unsubscribe@googlegroups.com.
To post to this group, send email to altdotnetturkiye@googlegroups.com.



--
Emre Mert Asyalıoğlu

--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturkiye+unsubscribe@googlegroups.com.
To post to this group, send email to altdotnetturkiye@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "altdotnetturkiye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to altdotnetturki...@googlegroups.com.
To post to this group, send email to altdotne...@googlegroups.com.
Visit this group at http://groups.google.com/group/altdotnetturkiye.
For more options, visit https://groups.google.com/d/optout.



--
İbrahim ATAY 
Consultant, PMI-ACP, NLP | Windows Azure Insiders

Blog : www.ibrahimatay.org  | Twitter : @ibrahim_atay  | Linkedin : @ibrahimatay

Berke Sokhan

unread,
Mar 19, 2014, 9:52:36 PM3/19/14
to altdotne...@googlegroups.com
Knockout ve Backbone demisken, Knockback ve Durandal daha "complete" cozumler olabilir :)

(sadece son mesaji gorup bu maili attim, umarim contexti kacirmamisimdir :)


19 Mart 2014 17:23 tarihinde oguzh4n <ogu...@gmail.com> yazdı:
Reply all
Reply to author
Forward
0 new messages