Click here to Skip to main content
15,885,309 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon6-Apr-17 8:09
cotsjdixon6-Apr-17 8:09 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming6-Apr-17 8:15
mveRichard Deeming6-Apr-17 8:15 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
cotsjdixon6-Apr-17 8:35
cotsjdixon6-Apr-17 8:35 
GeneralRe: Webhook receiver from the ground up using ASP.NET? Pin
Richard Deeming6-Apr-17 9:08
mveRichard Deeming6-Apr-17 9:08 
QuestionHow to upload excel sheet (.xlxs) to sql server 2012 with vb.net and asp.net Pin
Bocus Iqbal31-Mar-17 1:39
Bocus Iqbal31-Mar-17 1:39 
AnswerRe: How to upload excel sheet (.xlxs) to sql server 2012 with vb.net and asp.net Pin
CHill6031-Mar-17 5:36
mveCHill6031-Mar-17 5:36 
AnswerRe: How to upload excel sheet (.xlxs) to sql server 2012 with vb.net and asp.net Pin
User 41802543-Apr-17 9:07
User 41802543-Apr-17 9:07 
AnswerRe: How to upload excel sheet (.xlxs) to sql server 2012 with vb.net and asp.net Pin
ChetanAhire17-Apr-17 1:36
ChetanAhire17-Apr-17 1:36 
Use fileupload control and on submit button call below function and save the data in db in binary format.

Protected Sub btnUpload_Click(ByVal sender As Object, ByVal e As EventArgs)
' Read the file and convert it to Byte Array
Dim filePath As String = FileUpload1.PostedFile.FileName
Dim filename As String = Path.GetFileName(filePath)
Dim ext As String = Path.GetExtension(filename)
Dim contenttype As String = String.Empty

'Set the contenttype based on File Extension
Select Case ext
Case ".doc"
contenttype = "application/vnd.ms-word"
Exit Select
Case ".docx"
contenttype = "application/vnd.ms-word"
Exit Select
Case ".xls"
contenttype = "application/vnd.ms-excel"
Exit Select
Case ".xlsx"
contenttype = "application/vnd.ms-excel"
Exit Select
Case ".jpg"
contenttype = "image/jpg"
Exit Select
Case ".png"
contenttype = "image/png"
Exit Select
Case ".gif"
contenttype = "image/gif"
Exit Select
Case ".pdf"
contenttype = "application/pdf"
Exit Select
End Select
If contenttype <> String.Empty Then
Dim fs As Stream = FileUpload1.PostedFile.InputStream
Dim br As New BinaryReader(fs)
Dim bytes As Byte() = br.ReadBytes(fs.Length)

'insert the file into database
Dim strQuery As String = "insert into tblFiles" _
& "(Name, ContentType, Data)" _
& " values (@Name, @ContentType, @Data)"
Dim cmd As New SqlCommand(strQuery)
cmd.Parameters.Add("@Name", SqlDbType.VarChar).Value = filename
cmd.Parameters.Add("@ContentType", SqlDbType.VarChar).Value _
= contenttype
cmd.Parameters.Add("@Data", SqlDbType.Binary).Value = bytes
InsertUpdateData(cmd)
lblMessage.ForeColor = System.Drawing.Color.Green
lblMessage.Text = "File Uploaded Successfully"
Else
lblMessage.ForeColor = System.Drawing.Color.Red
lblMessage.Text = "File format not recognised." _
& " Upload Image/Word/PDF/Excel formats"
End If
End Sub
QuestionAngularGrid with Inline Editing(MVC,EF,AngularJs) Pin
Shirish1729-Mar-17 20:21
Shirish1729-Mar-17 20:21 
AnswerRe: AngularGrid with Inline Editing(MVC,EF,AngularJs) Pin
Nathan Minier30-Mar-17 1:34
professionalNathan Minier30-Mar-17 1:34 
QuestionHTML Editor in MVC Pin
User 418025429-Mar-17 4:48
User 418025429-Mar-17 4:48 
AnswerRe: HTML Editor in MVC Pin
Richard Deeming29-Mar-17 7:42
mveRichard Deeming29-Mar-17 7:42 
QuestionJQUERY in MVC 5 View (Navigate to hyperlink from an image in a table) Pin
Member 1192711028-Mar-17 15:29
Member 1192711028-Mar-17 15:29 
AnswerRe: JQUERY in MVC 5 View (Navigate to hyperlink from an image in a table) Pin
F-ES Sitecore28-Mar-17 22:33
professionalF-ES Sitecore28-Mar-17 22:33 
GeneralRe: JQUERY in MVC 5 View (Navigate to hyperlink from an image in a table) Pin
Member 1192711030-Mar-17 10:15
Member 1192711030-Mar-17 10:15 
QuestionQueried result from cotroller to PartialView into Listbox Pin
sunsher28-Mar-17 2:45
sunsher28-Mar-17 2:45 
AnswerRe: Queried result from cotroller to PartialView into Listbox Pin
F-ES Sitecore28-Mar-17 6:18
professionalF-ES Sitecore28-Mar-17 6:18 
QuestionNuGet Installation of EntityFramework Pin
xiecsuk27-Mar-17 22:34
xiecsuk27-Mar-17 22:34 
AnswerRe: NuGet Installation of EntityFramework Pin
Richard Deeming28-Mar-17 1:54
mveRichard Deeming28-Mar-17 1:54 
AnswerRe: NuGet Installation of EntityFramework Pin
xiecsuk28-Mar-17 3:07
xiecsuk28-Mar-17 3:07 
Questiondynamically change css theme does not apply on all pages Pin
prog.sidra27-Mar-17 19:44
prog.sidra27-Mar-17 19:44 
AnswerRe: dynamically change css theme does not apply on all pages Pin
ZurdoDev28-Mar-17 1:19
professionalZurdoDev28-Mar-17 1:19 
QuestionData organization problem Pin
samflex27-Mar-17 11:25
samflex27-Mar-17 11:25 
AnswerRe: Data organization problem Pin
Richard Deeming28-Mar-17 1:51
mveRichard Deeming28-Mar-17 1:51 
GeneralRe: Data organization problem Pin
samflex28-Mar-17 8:39
samflex28-Mar-17 8:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.