以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何改写此处  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=119269)

--  作者:nxdx112
--  发布时间:2018/5/21 21:41:00
--  如何改写此处
If dm.IsNull("课题")  Then
    MessageBox.Show("请先输入课堂名称!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    e.Cancel = True
Else
    e.FileName = dm("课题")
End If

e.FileName = dm("课题")此处如何改写使得添加的文件或图片根据课题列的内容命名,但文件的类型与添加时的类型保持一致。
[此贴子已经被作者于2018/5/21 21:42:32编辑过]

--  作者:有点蓝
--  发布时间:2018/5/21 21:50:00
--  
Dim name As String = FileSys.GetName(e.FileName)
Dim dir As String = e.FileName.replace(name,"")
msgbox(name)
msgbox(dir)
e.FileName = dir &  dm("课题") & name.split(".")(1)
msgbox(e.FileName)

--  作者:nxdx112
--  发布时间:2018/5/21 22:14:00
--  
谢谢,基本可以,就是弹出的msgbox有点多
--  作者:有点蓝
--  发布时间:2018/5/21 22:21:00
--  
额,测试用的,可以去掉