在我的数据库中,我有10个用户号码,其中一些号码已被删除,当我在以下节目中选择列时:
missing_user_number:
1,
2,
5,
8,
10,
Run Code Online (Sandbox Code Playgroud)
我需要知道是否有一个脚本可以得到这样的丢失数字,我不希望删除的数据,我只是希望丢失的数字作为整合数据:
missing_user_number:
3,
4,
6,
7,
9,
Run Code Online (Sandbox Code Playgroud) 我正在寻找一种简单的方法来检查上载文件的扩展名,如果它是PDF文件,请执行其他操作,否则将显示一条警告消息,指出其(错误的文件类型),但是我的代码存在问题,如果我选择了任何文件类型,而不是PDF,它会显示这个消息的错误页面:
Server Error in '/' Application.
PDF header signature not found.
Exception Details: iTextSharp.text.exceptions.InvalidPdfException: PDF header signature not found.
<asp:FileUpload runat="server" ID="file1" AllowMultiple="true" />
string fileName = Path.GetFileName(file1.FileName);
FileInfo fi = new FileInfo(fileName);
string ext = fi.Extension;
if (ext == ".pdf")
{
//do something
}
else
Label1.Text = string.Format("wrong file type");
Run Code Online (Sandbox Code Playgroud)