|
you have to store the image in binary format. so that u can fetch from database
Tech_spidy
|
|
|
|
|
ya i have little bit idea
i want to take the image by using Html fileinputbox control and from the specified path,i want to retrieve only the filename(not path).
and store that file(binary data) in one of my image field.
can u give me some code for doing this......
my code is..................
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click
'Dim str As String = Me.File1.Value()
'If InStr(str, ".jp") > 0 Then
' 'File1.PostedFile.InputStream()
'Else
' Exit Sub
'End If
Dim myStream As Stream
myStream = File1.PostedFile.InputStream
Dim ImgLength As Int64 = File1.PostedFile.ContentLength
Dim ImgBinaryData(ImgLength) As Byte
Dim n As Int64 = myStream.Read(ImgBinaryData, 0, ImgLength)
saveimage(ImgBinaryData)
End Sub
Public Sub saveimage(ByVal mImageFileData As Byte())
Try
Dim myTable As DataTable
Dim myRow As DataRow
conn = New SqlConnection(constr)
conn.Open()
cmd = New SqlCommand("spr_insertImage", conn)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@ImageData", mImageFileData))
cmd.ExecuteNonQuery()
conn.Close()
Catch ex As Exception
lblError.Text = ex.Message
End Try
End Sub
but its not working......
any help
|
|
|
|
|
Have you used the image datatype in database?
|
|
|
|
|
ya i have used image datatype....
but after inserting i m getting <binary> in the database...
|
|
|
|
|
Only a quick confirmation of my fears. I have a dynamically created treeview and when user selects a leaf node the tree view gets disabled and configuration of a product occurs. On completition of this the tree view is enabled once more but I would like to unselect the node. Otherwise if the user selects that node again the selectedindexchanged event does not occur as it should.
Is the treeview's selected index setable or just getable?? Thanks
|
|
|
|
|
You could try setting the SelectedNode property to null, that might work (or might delete the node from the tree?)
|
|
|
|
|
No you can't set the SelectedIndex because that property doesn't exist. Try tree.SelectedNode = null , or in your lame VB.NET terms tree.SelectedNode = Nothing . It should null out that reference to the tree node object. If only I had some soap on a rope I could.....
|
|
|
|
|
Thanks Badgr for your informative post. I added your code to my project, ran it, and got the following runtime error.
Rory is a c**k sucker
Do you know what this error means. I think it's something to do with Treeview's selectednode property being read only?
|
|
|
|
|
tree.SelectedNode.Selected = false;
You can suck me later....
|
|
|
|
|
hi,
how to create an auto complete text in ASP. if possible, provide me sample code.
regards
Tech_spidy
|
|
|
|
|
What exactly do you mean by auto complete? Where will the auto data come from?
|
|
|
|
|
hi Sam Heller,
auto complete textbox in the sense, in mobile when we are typing 'A' it will start showing the names coming under 'A',like that to do in ASP.
may be set of data we can store and retrive from db
Tech_spidy
|
|
|
|
|
Oh i see what you mean. You need to use Javascript, in particular the onkeyup function i think it's called. Then perform some sort of data retrieval upon what was typed in and show it in a positioned div below the the textbox. That's the rough idea anyway. If your using ASP.NET you could always just use the new autocomplete Atlas feature which you can get in the Toolkit
|
|
|
|
|
thanks for ur hint Sam Heller
Tech_spidy
|
|
|
|
|
|
hi ,
I have created a Windows Service application and it is running in a host.I want to get its status in aspx page.Like whether the service is started or stopped.
Is it possible to get status of WindowsService in Asp.net.
Plz give ur suggestions..
thanks in advance
cheers
sangeet
|
|
|
|
|
Assuming that your service is running on the same machine as your ASP.NET application, you could use WMI to query the service status. WMI functionality is exposed through the System.Management namespace. Like any system-level functionality, you'll need to have the proper permissions to expose this information.
If your service is on a different machine, or you aren't able to secure the proper permissions, you may wish to consider exposing a remoting interface from your service. In that way, you could connect to your service programatically, and ask it for a report of its current status. The catch here is that you'll need to write code in the service that can understand and report on its status. Another thing to be aware of is that if your service is not currently started, the connection will fail.
Here are a couple of resources to help get you started:Hope that helps.
--Jesse
|
|
|
|
|
i have a web page that displays data from dataset in HtmlTable
i add linkbutton in specific cell
i want whaen i click this linkbutton add new call in the specific cell
i hope my question clear
thanks for help
MD_NADA
|
|
|
|
|
the word in bold is not clear . can you explain
i want whaen i click this linkbutton add <b>new call </b>in the specific cell
Regards,
Sylvester G
Senior Software Engineer
Xoriant Solutions
sylvester_g_m@yahoo.com
|
|
|
|
|
my case is like the questions in codeproject
when you click the question link
the question details desplay
i want to do something like this in the HTMLTABLE
MD_NADA
|
|
|
|
|
Hi
Im developing File Upload and Download Project for my company.in this application i have to implement security(cryptography).any one tell me how to implement secure upload and download files
Regards
R.Palanivel
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
Most companies would use HTTPS to encrypt the link, then use normal ASP.NET or Java to do the rest. This allows clients to upload/download without using any additional software. With my company, the external partners are not very technically strong and often are not in control of what software can be run on their PCs - so a standard web connection is ideal.
I would recommend that the files are not physically stored on the web server - instead you would use .NET remoting to talk via a very strong firewall to a separate secured file-server.
Alternatively you could use PGP or GPG to encrypt files, then place the encrypted files on an external-facing ftp server. However this route would require your external partners to implement additional software.
Hope that helps.
Andy
|
|
|
|
|
Hi Andy
Thank u for your info..
r_palanivel83 10:01 4 Jan '06
|
|
|
|
|
Hi,
We are facing one issue in our web application.
Architecture is we have one end user site which fetches data from database and fetches images from share point site.
In end user site in one of our page we show grid which contain information along with the images related to that row. To show images we use one function
which request to share point site for images with Id/pwd for authentication.
This function is working properly.
In grid we are able to show all images properly. Currently we are showing 10 records per page means grid page size is 10.
Now the issue is :
On the same page there is a link which opens a popup, this popup shows all records in one grid without paging means all records on one page.
In this case we use same function to fetch images from share point and but this we are not able show all images properly some of the image are Red Cross
so we confirmed that whether images are present in share point site but the images are there in share point site.
above case we tested for 350 records also ... still only 190 to 180 images get download
while download images it shows status on status bar at bottom for e.g. (500 items remaining)
but in between suddenly it this status disappears from status bar and status also shows page complete download
I am not able to understand why images are not appearing and why they are appearing after right click and show image option.
Is there any issue related to memory ??
Is there any limit to show no. of images on one aspx page ??
Can any one help me in this issue …
Thanks in advance
|
|
|
|
|
This may be a bit of a shot in the dark, but it sounds to me like this could be a time-out issue. Some questions that you may wish to ask yourself: - Have you done any measurements around how long the popup takes to render with different amounts of records?
- How about the time it takes to retrive images from the SharePoint site?
- Are you retrieving each image individually or in a batch?
- Do you have any kind of cache strategy around the images, or are you asking SharePoint for them each time out?
One thing that you may wish to consider is using an HTTP Handler to request the images from SharePoint and cache them for future requests. For the extreme case, you may wish to consider having that handler preemptively request images from SharePoint and cache them before they are requested.
Of course, you would be trading higher memory usage for speed and would also have to make the decision as to how often you anticipate those images changing, and how close to real-time those images need to be returned.
Hope that helps a bit.
--Jesse
|
|
|
|