Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Dim filepath As String = fileUpEx.PostedFile.FileName Dim pat As String = "\\(?:.+)\\(.+)\.(.+)" Dim r As Regex = New Regex(pat) Dim m As Match = r.Match(filepath) Dim file_ext As String = m.Groups(2).Captures(0).ToString() Dim filename As String = m.Groups(1).Captures(0).ToString() Dim file As String = filename & "." & file_ext fileUpEx.PostedFile.SaveAs(Server.MapPath("\productimages\") & file) lblStatus.Text = file Dim connect As SqlConnection = New SqlConnection connect.ConnectionString = "<MY CONNECTION>" connect.Open() Dim strSQLInsert As String strSQLInsert = "INSERT INTO Products_Images(ProductID,FileName) values (" strSQLInsert = strSQLInsert & "'" & Trim(Request.QueryString("ProductID")) & "'," strSQLInsert = strSQLInsert & "'" & Trim(file) & "')" Dim command1 As New SqlCommand(strSQLInsert, connect) Try command1.ExecuteNonQuery() Finally command1.Dispose() connect.Close() connect = Nothing End Try
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Help with preventing downloading a zip file||10||49|
|Get month and date in a format||4||45|
|Retrieve Active Directory Groups a User belongs to in VB.NET||3||48|
|ASP.NET Complete Life Cycle for all the controls||2||20|