.net vb自定义控件求救 - .NET技术 / 组件/控件开发
重写Render如下:
Protected Overrides Sub Render(ByVal writer As System.Web.UI.HtmlTextWriter)
CreateChildControls()
MyBase.Render(writer)
writer.Write("<script type=""text/javascript"">" _
& "function PreView(FileName){" _
& "var ext=FileName.substring(FileName.lastIndexOf("".""),FileName.length);" _
& "ext=ext.toLowerCase();" _
& "if((ext!='.jpg')&&(ext!='.gif')&&(ext!='.jpeg')&&(ext!='.png')&&(ext!='.bmp')){" _
& "alert(""你选择的不是有效的图片文件!"");}else{" _
& "document.getElementById(""PreView"").innerHTML=""<img src='""+FileName+""' style='width:100px;height:100px; border:0px;' alt=''/>"";}" _
& "}" _
& "</script>")
End Sub
重写CreateChildControls如下:
Private Sub BuildControl()
Dim HIF As New HtmlInputFile
Dim HIB As New HtmlInputButton
HIF.ID = UniqueID & "_UpFile
相关问答:
为什么我用form.show和form.hide多次连接了两个窗口只能互换链接两次啊?
代码看看
照道理form.show 没次数限定的吧
我也快疯了。
楼主知道怎么发贴么?
引用
我也快疯了。
楼主知道怎么发贴么?
楼主也 ......
form1中有text1-8, 和command1
text8中为程序代码(生成窗体为form2(已做好))
单击command1后将text2中的代码生成EXE到d:\ 并且text1-7分别对应
产品名 公司名 合法版权 合法商标 文件描述 注释 标题
......
谁能帮我把下面这些代码改成VB形式的,多谢了,急用~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[],float g ......
挺繁琐,之前发的帖子,分值太低现在重发一个。欢迎各位大侠~~
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
float objfx(float x[]);
void constraint(float x[] ......