Skip to main content

ASP.NET code model

Normally visual studio support in two code models when coding a web page.
1. Inline code
2. Code-behind

Inline code
This is the common model in use in traditional ASP and when develop a simple web application. Under this model all coding and HTML stuff pack in signal .aspx file. This model become to handy because it keep every thing in place.

Code-behind
In this model there are two file behind one web page. The .aspx file is included HTML markup and control tags when included all code (C#, C++, J#) in a.cs (if programming language is C# ).

In visual studio we have freedom to select one of these two option when we create a webpage.
File->New



Comments

Popular posts from this blog

How to extract vtiger DB data

Here is the code sample how extract data form vtiger DB with WHERE close. Sample:1 require_once('include/DatabaseUtil.php'); global $adb; $tabid = array('9','16'); $sql = "SELECT tabid, fieldname, fieldid, fieldlabel,columnname, tablename, uitype, typeofdata, presence FROM vtiger_field WHERE tabid in (" . generateQuestionMarks($tabid) . ")"; $result = $adb->pquery($sql, array($tabid)); // get result $noofrows = $adb->num_rows($result); // get number of rows $i=0; $data=array(); while($resultrow = $adb->fetch_array($result)) { $tabid=$resultrow['tabid']; $resultrow=['fieldlabel']; $data[$i]=array($tabid, $resultrow); } Sample:2 require_once('include/DatabaseUtil.php'); global $adb; $query = 'select idlists,from_email,to_email,cc_email,bcc_email from vtiger_emaildetails where emailid =?'; $result = $adb->pquery($query, array($focus->id)); $from_email = $adb->query_result($result,0,'from_...

Ananda

Current Software Engineer at LM Jinasena and Company (PVT) LTD Past Software Engineer at Archmage (PVT) LTD Trainee software Engineer at Respere ( Sahana Company ) Education Faculty of Information technology, University of Moratuwa ( http://www.mrt.ac.lk/ )- 2005/2006 batch Dammissara National school Naththandia (2004-Maths section) Websites My Blog Facebook Ananda’s Summary I am a graduate of Faculty of Information technology University Of Moratuwa and keen on web development field and specialized on IT management. Ananda’s Specialties: Technology: Pervasive computing, mobile backend solutions, mobile solutions, GIS, neo-geography, Location based services, Web 2.0, Social web,FOSS, Disaster Management Solutions Organizational: Strategic Planning, Project Management, Business Development, New Product strategy Ananda’s Experience Software Engineer, LM Jinasena and Company (PVT) LTD L M Jinasena and Company (PVT) LTD Aug 2010 — Present Software Engineer, Archmage (PVT) LTD Archmage (...

Creating Joomla Component Submenus

Simply we can add joomla component sub menu using component installation xml file. For that you need to include fallowing xml elements in your xml file inside com installation zip file. Main Menu Name/Component Name Menu Item 1 Menu Item 2 Menu Item 3 Menu Item 4 Menu Item 5 if some one need to add additional sub menus when already installed component you can add those using simple direct DB insert operation. Steps: 1. Go to the joomla database. 2. Select "DBfrefix_components" table. 3. Get component id by doing some search for "name" column and select its "id". 4. Now add your desired sub menu as fallow. INSERT INTO `jos_components` (`id`, `name`, `link`, `menuid`, `parent`, `admin_menu_link`, `admin_menu_alt`, `option`, `ordering`, `admin_menu_img`, `iscore`, `params`, `enabled`) VALUES (1, 'Main Menu Name/Component Name', 'option=com_componentname' , 0, 0,'option= com_componentname', 'Main Menu Name/Component Name', ...