|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
在实现ERP等高端的ASP应用时,用户需要提供核心的经营资料,需要ASP商有很高的信用度。楼上说交互性不好,太牵强了吧。在微软提供的一套框架中,利用asp做网站,开发效率高,使用人数少,减少不必要的开销。交互性是互动方式,是有开发人员决定的。<%@PageLanguage="VB"Debug="true"%>
<html>
<head>
<scriptlanguage="VB"runat="server">
SubPage_Load(SenderAsObject,eAsEventArgs)
IfNotIsPostBackThen
DimvaluesAsNewArrayList()
values.Add(NewPositionData("Microsoft","Msft"))
values.Add(NewPositionData("Intel","Intc"))
values.Add(NewPositionData("Dell","Dell"))
myDataGrid.DataSource=values
myDataGrid.DataBind()
EndIf
EndSub
PublicClassPositionData
PrivatemyNameAsString
PrivatemyTickerAsString
PublicSubNew(newNameAsString,newTickerAsString)
Me.myName=newName
Me.myTicker=newTicker
EndSub
PublicReadOnlyPropertyName()AsString
Get
ReturnmyName
EndGet
EndProperty
PublicReadOnlyPropertyTicker()AsString
Get
ReturnmyTicker
EndGet
EndProperty
EndClass
SubDataGrid_ItemCreated(SenderAsObject,eAsDataGridItemEventArgs)
SelectCasee.Item.ItemType
CaseListItemType.Item
DimmyDeleteButtonAsButton
myDeleteButton=e.Item.FindControl("btnDelete")
myDeleteButton.Attributes.Add("onclick","returnconfirm(AreyouSureyouwanttodeletethiscompany?);")
CaseListItemType.AlternatingItem
DimmyDeleteButtonAsButton
myDeleteButton=e.Item.FindControl("btnDelete")
myDeleteButton.Attributes.Add("onclick","returnconfirm(AreyouSureyouwanttodeletethiscompany?);")
EndSelect
EndSub
SubDataGrid_DeleteRow(senderAsObject,eAsEventArgs)
Label1.Text="HEY,youcantdeletethatcompany!"
EndSub
</script>
</head>
<body>
<asp:Labelid="Label1"runat="Server"/>
<formrunat=server>
<asp:DataGridid="myDataGrid"
OnItemCreated="DataGrid_ItemCreated"
DataKeyField="Name"
AutoGenerateColumns="True"
runat="server">
<Columns>
<asp:TemplateColumnHeaderText="Delete?">
<ItemTemplate>
<asp:buttonid="btnDelete"runat="Server"Text="DeleteRow"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:DataGrid>
<p>
</form>
</body>
</html>
[img=1border=0style=,1src=]http://www.ckuyun.com/[/img]
国内有些大的CRM厂商的ASP就写得不错.无论是概念还是它里面用JAVASCRIPT的能力.并不是说现在的程序员用了ASP.NET来写程序就可以说自己高档了 |
|