|
hi
i think my mail has just got distrbed ..
wat should write in "Src=...." if at all i want to display the images present in a database..
thank u
rack
|
|
|
|
|
can u please tel me wat should be written in " Src=..." if i have to display images from database..
thank u
|
|
|
|
|
Why did you ask this over and over ?
You need to write a HTTP Handler that pushes out the bytes of the bitmap from the DB. It would typically take the id of the image in the DB on the URL, read it and then do a BinaryWRite of the data. Your src tag would contain the URL that loads the image from the DB
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello everyone.
I have a little application in which there are some main pages, and some detail pages for each main page.
in the detail page there is a button which gets you back to one of the main pages.
the main page, in the OnLoad method, there is a method which saves the page thet led you there (using HttpRequest.UrlReferrer).
I need the main page not to store the urlreferrer of the detail page, passing null as urlreferrer value.
I know javascript does this, but for some reason i cannot use it - and i am forced to do everything server-side.
Is there some method which sends you to one page, without passing its own url?
I googled about it and found lots of pages about people complaining that Response.redirect has this behaviour. I tried, and to my dismay, found that in my application works flawlessly - that is NOT what i want. I need Response.redirect NOT to work, thus passing null as the HttpRequest.UrlReferrer value.
I know this is at least confusing, but please try and see if you can give me an hand.
Thanks in advance.
Rey9999
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
This looks odd. Changing the value sent on referrer can't be done AFAIK. BTW, why you need such a solution ?
|
|
|
|
|
N a v a n e e t h wrote: BTW, why you need such a solution ?
It is a long story....
Anyway, i do not need to change it. I just need it to be null, and i know there are some situation in which HttpRequest.UrlReferrer is null.
Example:
typing a new url in the address bar
using browser history
using javascript...
I need something like that, just server-side. I read around that Response.Redirect has sometimes this behaviour, but not in my case.
Any ideas?
~~~ From Milano to The Hague, easy as it goes ~~~
|
|
|
|
|
I think you cannot do it in server.
Whether Main and Detail page url has any pattern.
If it has then use it to check whether its detail or mail page and work with that.
Else, i think HttpRequest.UrlReferrer cannot be set null from Server.
Also have you tried using
Response.Headers referrer property to null
Check My other Asp.net Posts
|
|
|
|
|
Hellooo Friends
i am using Webservicees and i got error(The request failed with HTTP status 401: Unauthorized.)how i solved it Please Help me.
The request failed with HTTP status 401: Unauthorized.
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
I suggest reading the article I link to in my sig. Esp the bit on error messages.
2nd google hit[^]
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Its not work
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
Check this post out:
http://forums.aspfree.com/net-development-11/the-request-failed-with-http-status-401-unauthorized-11744.html
|
|
|
|
|
ANSWER:-
discoveryService.Credentials = New System.Net.NetworkCredential("Administrator", "", "CRM")
Piyush Vardhan Singh
p_vardhan14@rediffmail.com
http://holyschoolofvaranasi.blogspot.com
http://holytravelsofvaranasi.blogspot.com
|
|
|
|
|
well done, did the link help?
|
|
|
|
|
Dear All,
The Scenario is
The User has to import the .csv/.xls file which is reside in the Client Machine, if the user click the Load Button all the data from .csv/.xls file should be Filled in the DataGrid and then commit in the Database. Im facing the problem When i Click Load Button, It Shows "Unspecified Error" when i open the OleDB Connection. What Could be the Problem ?
Please Someone help me in this Regard.
Here the Code :
Private Function GetExcelData(ByVal strpath As String) As DataSet
Try
Dim ExcelConnection As String = ""
ExcelConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strpath & ";" & "Extended Properties=""Excel 8.0;HDR=Yes"""
Dim strExcelConn As String = ExcelConnection
Dim dbConn As New Data.OleDb.OleDbConnection(strExcelConn)
Dim strSQL As String
Dim delimeter As Char() = {"\"}
Dim splitter As String() = strpath.Split(delimeter)
Dim file As String = splitter(splitter.Length - 1)
strSQL = "SELECT * FROM [" & file & "$]"
dbConn.Open()
Dim cmd As New Data.OleDb.OleDbCommand(strSQL, dbConn)
Dim dsExcel As New DataSet
Dim daExcel As New Data.OleDb.OleDbDataAdapter(cmd)
daExcel.Fill(dsExcel)
dbConn.Close()
Return dsExcel
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Function
Private Sub btnClick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click
Try
Dim filepath As String = System.IO.Path.GetFullPath(Me.FindFile.PostedFile.FileName)
GrdExcel.DataSource = GetExcelData(filepath)
GrdExcel.DataBind()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
With Warm Regards
Sathish.C
|
|
|
|
|
Wow - you created a new account to ask this question again ? What is your problem ? The answer is the same as what I already said to you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The Problem is when im importing the .csv/.xls file from the client machine(i.e the Browser's machine). It showing the "Unspecified Error" I Cant Understand Why ?
If got some idea regarding this reply me.
With Warm Regards
Sathish.C
|
|
|
|
|
I'm sorry. It's plain this task is beyond you and you should just give up. Certainly asking again as you did, under a new account, is very rude.
For the third time. The file is on the client. It's not on the server. That is your error. You have the file as a byte stream, so you need to save it to the server, and then use that path ( which, unlike the path you're using, will be valid on the server ) to load the file in Excel.
I'm sorry, even if you get past this, I'd say you need to abandon the work you're doing and read some books on ASP.NET, to get you some basic understanding so you're able to understand clear help when it's offered to you. And, you need to learn some manners too. Creating a new thread, with a new account, when someone is trying to help you on the thread just below it, is just plain rude. I'm sure you have a job that you're incapable of doing, and you're feeling the pressure because you're inadequately prepared for the task at hand. But, this is not our problem. I have stuck with this because I am trying to help you, but I did this despite the way you presented yourself, not because of it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is not a new account.
My name is Sathish Im working as a software Trainee.
The Message which is posted in the morning is my Colleague BalaGuru.
We Both are doing this application.
I ve Created this account 3 Months before.
Just now i came to know about the Message Board in this Site.
That's Why i posted my query.
Im just the beginner.
I dont want to cheat anyone.
With Warm Regards
Sathish.C
|
|
|
|
|
Whatever - it seems odd to me that he posted, I answered, then you posted the same thing. Either way, I hope between you, you've managed to understand my explanation, I really would recommend you both do some reading, because the basic nature of ASP.NET seems to have escaped you.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
How can two people working together not have communicated to each other that they were both posting the same question on the same forum, sounds strange to me.
Anyway there are plenty of tutorials out there and like Graus said a book one probably be useful for you to understand the basics of asp.net works.
|
|
|
|
|
|
It's the thread right under this one.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sathish Chakrapani wrote: "Unspecified Error" I Cant Understand Why ?
Because .NET requires you use a batch file to import. Don't forget to call System.Batch.File.Run.ReallyRun.LikeNow("foo.bat"); .
|
|
|
|
|
Hi Friends...
I am importing data from excel file to a datagrid.I use the following code to do that.But i get "Unspecified error" when i open the oledb connection.Wat could be the problem.Someone help in this regard...The code is given below...
Private Sub btnClick_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClick.Click
Try
Dim filepath As String = System.IO.Path.GetFullPath(Me.FindFile.PostedFile.FileName)
GrdExcel.DataSource = GetExcelData(filepath)
GrdExcel.DataBind()
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Sub
Private Function GetExcelData(ByVal strpath As String) As DataSet
Try
Dim ExcelConnection As String = ""
ExcelConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & strpath & ";" & "Extended Properties=""Excel 8.0;HDR=Yes"""
Dim strExcelConn As String = ExcelConnection
Dim dbConn As New Data.OleDb.OleDbConnection(strExcelConn)
Dim strSQL As String
Dim delimeter As Char() = {"\"}
Dim splitter As String() = strpath.Split(delimeter)
Dim file As String = splitter(splitter.Length - 1)
strSQL = "SELECT * FROM [" & file & "$]"
dbConn.Open()
Dim cmd As New Data.OleDb.OleDbCommand(strSQL, dbConn)
Dim dsExcel As New DataSet
Dim daExcel As New Data.OleDb.OleDbDataAdapter(cmd)
daExcel.Fill(dsExcel)
dbConn.Close()
Return dsExcel
Catch ex As Exception
Response.Write(ex.Message)
End Try
End Function
Balaguru
|
|
|
|
|
The problem is you don't understand what ASP.NET is, at all.
You get a filepath from your client, then you try to read the file on the server. Unless the server and client are the same machine, that isn't going to work, the file just isn't there.
SAve the file to the server file system in order to read it. Of course, this presents it's own problems, if you have more than one user at once and the file names clash, you'll be in trouble. Use Path.GetTempFileName ( something like that ) to work around that, or just File.Exists when you're saving it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|