|
首页>编程技术>编程杂谈> |
.net问题,“image”不明确 |
|
Visited times , Welcome to Data Mining Forum & Data Mining Expert & Data Mining Tools |
|
|
.net问题,“image”不明确imports microsoft.visualbasic
imports system
imports system.drawing
imports system.web
imports system.web.ui
imports system.web.ui.webcontrols
imports system.web.ui.htmlcontrols
public class greetingcardmaker
inherits page
protected lstbackcolor as dropdownlist
protected lstfontname as dropdownlist
protected txtfontsize as textbox
protected chkpicture as checkbox
protected txtgreeting as textbox
protected pnlcard as panel
protected lblgreeting as label
protected lstborder as radiobuttonlist
protected imgdefault as image
protected withevents cmdupdate as button
private sub page_load(sender as object,e as eventargs) handles mybase.load
if me.ispostback=false then
lstbackcolor.items.add("white")
lstbackcolor.items.add("red")
lstbackcolor.items.add("green")
lstbackcolor.items.add("blue")
lstbackcolor.items.add("yellow")
lstfontname.items.add("times new roman")
lstfontname.items.add("arial")
lstfontname.items.add("verdana")
lstfontname.items.add("tahoma")
lstborder.items.add(new listitem(borderstyle.none.tostring(),borderstyle.none))
lstborder.items.add(new listitem(borderstyle.double.tostring(),borderstyle.double))
lstborder.items.add(new listitem(borderstyle.solid.tostring,borderstyle.solid))
lstborder.selectedindex=0
imgdefault.imageurl="defaultpic.png"
end if
end sub
private sub cmdupdate_click(sender as object,e as eventargs) handles cmdupdate.click
pnlcard.backcolor=color.fromname(lstbackcolor.selecteditem.text)
lblgreeting.font.name=lstfontname.selecteditem.text
if val(txtfontsize.text)>0 then
lblgreeting.font.size=fontunit.point(val(txtfontsize.text))
end if
pnlcard.borderstyle=val(lstborder.selecteditem.value)
if chkpicture.checked=true then
imgdefault.visible=true
数据挖掘研究院 else
imgdefault.visible=false
end if
lblgreeting.text=txtgreeting.text
end sub
行 17: protected lblgreeting as label
行 18: protected lstborder as radiobuttonlist
行 19: protected imgdefault as image
行 20: protected withevents cmdupdate as button
“image”不明确,从命名空间或类型“System.Web.UI.WebControls, System.Drawing”导入
请问是什么问题? 是由两个叫 Image 的类
要么
protected imgdefault as System.Drawing.Image
要么
protected imgdefault as System.Web.UI.WebControls谢谢,回答正确,呵呵!!
|
|
|
|
|
[数据挖掘专家]
[数据挖掘研究院]
[数据挖掘论坛]
[数据挖掘实验室]
|
上一篇:C语言 逻辑表达式的简化问题
下一篇:||是怎么输入的
|
|
|
|