Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
Q

Q_Quek

@Q_Quek
About
Posts
9
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Get "delete" answer before delete "File" in GridView
    Q Q_Quek

    Hi, I got a Image gridview in a page. There is one delete button column to delete record. It is no problem to delete data in the database, but what I need is delete the image file as well if user click "OK" from the confirmation dialog. How can I get the "answer" whether user is click "OK" button or "Cancel" button? This is my code for delete the image record. OnClientClick="return confirm('Are you sure you want to delete this record?');" So, what method I should use for delete the image file? RowDeleting or RowDeleted. Protected Sub GridView1_RowDeleted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeletedEventArgs) Handles GridView1.RowDeleting File.Delete(Server.MapPath(".\\") + "..Photo/" + imgName) End Sub Calvin ****

    ASP.NET question database design sysadmin help

  • get child control to gridview
    Q Q_Quek

    Hi, I need to get child control to the gridview during edit mode. In fact I have a date field, during edit mode, the date will be in a textbox, beside the textbox is an image button. For what I need is if user click on the button, it will popup a calendar. After user selected the date, then calendar will automatic close. And that selected date will be place into the textbox. So, how do I get control to the image button which is in edititemtemplate? Is anyone can help me!! Calvin ****

    ASP.NET question help

  • Image in GridView becomes "System.Byte[]"
    Q Q_Quek

    Hi, I try to use gridview with objectdatasource to obtain the images from the sql database. Within the database, a datafield is declare as "image" datatype. Now in my gridview, it doesn't show me the image instead of showing me a text "System.Byte[]" May I know how to solve it. What column I should use for the image? ImageField, TemplateField, Bound Field? Please help me!!! Calvin ****

    ASP.NET database help tutorial question

  • Set parameter value to "Insert Parameters"
    Q Q_Quek

    Thank you for answer my question with the solution. That's works. However, I get System.Byte[] :confused:from the gridview of ImageField or templatefield. May I know what wrong to the gridview? ****

    ASP.NET help question database wpf wcf

  • Set parameter value to "Insert Parameters"
    Q Q_Quek

    Hi, I am using objectdatasource as datasource in page. I use the "File Upload" control to get the image and save to database. Within the database table, there are a lot of datafield. I got the problem of setting the parameter value for the image. I use three datafield to store the image relevant data. Datafield DataType 1. imgName (nvarchar 50) 2. imgData (Image) 3. imgType (nvarchar 50) Try Dim imgName As String Dim imgContentType As String Dim imgLen As Int32 Dim imgbin() As Byte If Me.FileUpload.HasFile = True Then If Me.FileUpload.PostedFile.FileName.Trim.Length > 0 And Me.FileUpload.PostedFile.ContentLength > 0 Then Dim imgStream As Stream = Me.FileUpload.PostedFile.InputStream() imgLen = Me.FileUpload.PostedFile.ContentLength imgContentType = Me.FileUpload.PostedFile.ContentType imgName = Me.FileUpload.PostedFile.FileName.Substring(Me.FileUpload.PostedFile.FileName.LastIndexOf("\") + 1) Dim imgBinaryData(imgLen) As Byte 'Dim n As Int32 = imgStream.Read(imgBinaryData, 0, imgLen) imgbin = imgBinaryData ObjectDataSource.InsertParameters("imgName") = imgName ObjectDataSource.InsertParameters("imgData") = imgbin ObjectDataSource.InsertParameters("imgType") = imgContentType ObjectDataSource.Insert() Question 1: How can I set the "value" to the parameter? 2. Do I make mistake to the image field, since declare in database is "Image" datatype and use "Byte" in codebehind? 3: For next time if user want to retrieve the image, can it be "restore" as "image file"? 4. Can I use the "File Upload" control in "DetailsView" with objectdatasource? Because I have try to do it, but unsuccessful. Since I use the "Template Field" and drag the "File Upload" control to the "InsertItemTemplate", but there is no bound property of "text" which to bound to the "field binding". So, is this possible to use "file upload" control in DetailsView?? If so, how to do It. 5. With the approach in question 4, the DetailsView was include in the "atlas:UpdatePanel", will this make error? Appreciate for those giving solution and help. Calvin ****

    ASP.NET help question database wpf wcf

  • Determine which cell was clicked in datagrid
    Q Q_Quek

    Well, this is good solution, thank you very much Calvin ****

    ASP.NET help tutorial question csharp

  • Determine which cell was clicked in datagrid
    Q Q_Quek

    Hi, I got a problem of how to identify the cell was clicked in datagrid. In my datagrid, there are 10 template column and each column have a label and image button. I want to hide the label when user click the image button. I do not know which row of cell is clicked but column. I create a command to the button, for example: HTML: CodeBehind(VB.NET) Public Sub GetControl(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.CommandEventArgs) Select Case "e.CommandArgument" Case "1" 'Column 1 Dim Label1 as Label = DataGrid1.item(??).FindControl("Label") Label1.visible = False Case "2" 'Column 2 ... End Select End Sub Notice the ??(row), how can I get it??????? I was struggle on this problem couple of day, appreciate for any help! :) Calvin ****

    ASP.NET help tutorial question csharp

  • Set first item in dropdownlist cannot be selected
    Q Q_Quek

    Hi, Is anybody know how to make user unable to select the first item in dropdownlist, normally is "Please select..." on top of dropdownlist and how to validate the dropdownlist (Required field validator)if is selected or not. Thanks to all giving comments and suggestion. Calvin ****

    ASP.NET tutorial

  • Validation does not work in IE 6.0
    Q Q_Quek

    Hi, My form use several validation(RequireField Validation, RegularExpression Validation..) that is running in localhost, however after i upload file to server, the check validation does not work. I'm using IE Version 6.0 , could anybody tell the reason and how to solve it. Calvin:confused: ****

    ASP.NET sysadmin tutorial announcement
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups