if(File1.PostedFile.ContentType<>"image/jpeg" and File1.PostedFile.ContentType<>"image/gif") then Page.RegisterStartupScript("error","<script>alert('文件名只能是.jpg/.gif')</script>");
return;
End if
return;
End if
解决方案 »
- 数据库链接
- 每一次运行程序之前都需要编译?为什么?
- 如何用ASP.Net做一个在线客服系统?????
- GridView和CheckBox结合使用的问题
- 一个菜鸟问题,Label控件是否可以显示多个值?
- 怎样在asp.net中利用web.config的<authorization>记实现特殊页的身份验证
- 关于 未将对象引用设置到对象的实例 错误
- button批量删除repeater中数据的问题
- 求助!!
- 使用DataAdapter.Update更新数据库的问题
- 编译器错误信息: CS1595: 已在多处定义“Microsoft.Web.UI.WebControls.TreeView”;使用
- 免费控件库下载
If (myfile.PostedFile.ContentType.ToLower() <> "image/gif" And myfile.PostedFile.ContentType.ToLower()<>"image/jpg") Then
yhsw.alert(Me, "图片类型必须为.jpg或.gif形式!")
End If'试试