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.

drupal 6 - hook_menu giving 404 -


i trying create simple module in drupal 6.20 follows:

<?php  function example_help($section) {   switch ($section) {     case 'admin/modules#description':       return t('this module implements example form.');   } }  function example_menu($may_cache) {   $items = array();   if ($may_cache)    {     $items[] = array(       'path' => 'example',       'title' => t('example'),       'callback' => 'example_page',       'access' => true,       'type' => menu_normal_item     );   }   return $items; }  function example_page() {   return drupal_get_form('example_page_form'); }  function example_page_form() {   $form['fullname'] = array(     '#type' => 'textfield',     '#title' => t('enter full name'),   );   $form['submit'] = array(     '#type' => 'submit',     '#value' => t('save'),   );   return $form; }  function example_page_form_submit($form_id, $form_values) {   ...some code } 

but whenever typing in http://mysite.com/example, getting redirected 404. please help. new drupal technology. there ne more files needed apart .info , .module file?

thanks.

ive got solution. drupal 6.x menu hook should follows:

function example_menu() {   $items = array();     $items['example'] = array(         'title' => 'list',         'page callback' => 'example_page',         'access callback' => 'user_access',         'access arguments' => array('access content'),         'weight' => -10,         'type' => menu_default_local_task,       );   return $items; } 

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 -