Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Edit link in theme_table drupal -


i have created table in drupal display records. how can add edit link each record goes input form corresponding id record

    function display($nid){ $query = db_query("select * {contactus}"); $data = array(); $i = 0; while($row = db_fetch_array($query)){     $data[$i] = $row;      $i++; } $output = theme_table(array('id','email','comment'),$data); return $output;    } 

you must implement full crud-range, create read update delete. right have index. drupal7 there example in dbtng (from examples)

for drupal 6 not aware of such example.

basically pattern is:

  1. make hook_menu-items callbacks, 1 index, read, update, delete, create.
  2. the read item shows item (item/%id)
  3. the update shows form update item (item/%id/edit). form pre-filled. see formapi in drupal more information on forms.
  4. the delete shows confirm_form() callback delete entry database.
  5. the create shows form create new item. form empty.

but answer exact quesion, in drupal create link l(). l('foo', 'item/bar') create <a href="/item/bar">foo</a>.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -