1. Simple Ext. Panel example
Code:
<! Doctype html > < Html > < Head > < Title > @ Viewbag. Title </ Title > < Link Href = "@ URL. Content (" ~ /Scripts/ext-3.4.0/resources/CSS/ext-all.css ")" rel = "Stylesheet" Type = "Text/CSS" /> < Script SRC = "@ URL. Content (" ~ /Scripts/ext-3.4.0/adapter/EXT/ext-base.js ")" Type = "Text/JavaScript" > </ Script > < Script SRC = "@ URL. Content (" ~ /Scripts/ext-3.4.0/ext-all.js ")" Type = "Text/JavaScript" > </ Script > < Script SRC = "@ URL. Content (" ~ /Scripts/ext-3.4.0/src/locale/ext-lang-zh_CN.js ")" Type = "Text/JavaScript" > </ Script > @ Rendersection ("Header ") </ Head > < Body > @ Renderbody () </ Body > </ Html >
@ {Viewbag. Title = "Index"; layout = "~ /Views/shared/_ layout. cshtml ";} @ section header { < Script Type = "Text/JavaScript" > Ext. onready ( Function (){ VaR Pnl = New Ext. Panel ({El: ' Test ' , Title: ' Title ' , Collapsible: True , Titlecollapse: True , Width: 200 , Height: 150 , HTML: ' Content ' }); Pnl. Render ();}); </ Script > } < Div ID = "Test" > </ Div >
: