Saturday, 15 March 2014

asp.net - writing a library class properly -



asp.net - writing a library class properly -

this first library class writing , sense need load on topic cannot find best sources. have web forms project uploads pdf , creates qrcode , places in document. need create library don't know start or exact structure. every method it's own subclass in library class? or can have them in 1 , professional way of going this.

this party of web forms application need create library for:

void updatestudentsubmissiongrid() { var usr = studentliststep2.selecteditem user; var lib = assignmentliststep2.selecteditem library; if (usr == null || lib == null) return; using (var dc = new docmgmtdatacontext()) { var subs = (from doc in dc.documents doc.ownedbyuserid == usr.id && doc.libraryid == lib.id select new {docid = doc.id, assignment = doc.library.name, submitted = doc.uploaddt}) .orderbydescending(c => c.submitted) .tolist(); studentsubmissiongrid.datasource = subs; } }

how start method?

by looks of things using function single webpage. can phone call function event i.e. user hits submit button. on the. click button , create onclick event. phone call code within there updatestudentsubmissiongrid(); create sure function not nested within event or function. webforms class, placing function within class.

asp.net dll webforms

No comments:

Post a Comment