|
thanks guys for your answers.
I will have a look into each suggestion.
but i probably dont get around playing with the user permission, because the software is doing a self-update as well for example - means, the software needs the rights to write into the application folder to perform all the action neccessary to update the application.
I see microsofts idea of using these user-directories for storing user data belonging to the application - but I dont like it. I would like to have everything belonging to the application in one single directory.
but thanks anyway
cheers
piratenwichtl
|
|
|
|
|
|
Hi guys,
any idea to display image in webpage directly from database (image control need url) i want to display it without url is it possible? or any other way to do this?
|
|
|
|
|
Aside from the fact you have posted this question in the wrong place (it should be in the ASP.NET forum[^]), you have already received the answer to this question from Guffa here[^]
He said: "you need a proxy page that gets the image data from the database and writes it to the response stream, and you use the url of the proxy page as ImageUrl".
Simon
|
|
|
|
|
Stop asking the same question again and again. Start reading and exploring the answers that were given to you. That's the way to learn programming.
|
|
|
|
|
Hi,
Iam creating picture box dynamically but iam getting this error,
CODE:
PictureBox pb = new PictureBox();
Form.Controls.Add(pb); //Error is in this line//
The error comment is:
The best overloaded method match for 'System.Web.UI.ControlCollection.Add(System.Web.UI.Control)' has some invalid arguments.
|
|
|
|
|
You can't put windows controls in a web page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Then any idea to display image in webpage directly from database (image control need url) i want to display without url is it possible?
|
|
|
|
|
No, that is not possible. The browser requests the image separately from the page, so it needs an url to request it from.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
You need to set up a proxy page, which reads the image data from the database and writes it to the output stream. Then you set the ImageUrl to the url of your proxy page.
|
|
|
|
|
there are several options
- if you can take out the files from the database, you can set them in a directory and save the paths instead.
- if that's not an option, stream the file to a tmp directory and set the url to that path, when the session expires you delete the files used within that session (you'll need a good naming convention...)
hope this helps.
|
|
|
|
|
You forgot the solution that doesnt require writing the data to disk, which the OP has now been given >3 times.
|
|
|
|
|
I have a design problem here.
in the BIL there are some classes that represent business entities
each of this class is static. and they all have mostly the same (static) members :
- some info methods like give the pk for that entity
- perform some actions on it: search for that specific business entity.
- and so on
I want to enforce that some methods are implemented on each static class.
how can I do it ? note that interfaces don't work here since it is a static class
maybe the design is wrong here, better alternatives ?
<< Nearly all men can stand adversity, but if you want to test a man's character, give him power. >>
|
|
|
|
|
No, unfortunately, static classes must derive from Object and nothing else, and neither interfaces or abstract classes can be static anyway.
It's hard to comment on your design without seeing the whole thing, but I would suggest that yes, to have static classes representing business entities is a bit of a strange design.
Again, it's hard to suggest alternatives without seeing everything you are trying to do, but a pretty standard way is to have a bunch of business objects that define your business entities, these can then be created 1 for each entity and store all the values, and can possibly inherit from a base entity object.
Simon
|
|
|
|
|
Hi All
Iam Using the SqlConnection To Connect To Sql Server 2005
And the connecte is Done .
I wount to Connecte to Sql Server 2005 By Using OledbConnection Or ODBCConnection , My Quesion Is :
how I Can Connecte to Sql Server 2005 With OLedbConnection Or ODBCConnection ? and it is a Write Connect ?
Thanks For any body help me
Thaer
|
|
|
|
|
Take a look here[^], It might help you.
Life is 5: 3 me, 1 you.
|
|
|
|
|
Ok Thanks Mr Pedram Behroozi
iwount To Know Can I Use The ODBCConnection Or OledbConnection to Connecte to Sql Server 2005
Thaer
|
|
|
|
|
I think so but OdbcConnection requires an ODBC driver for the database while OleDbConnection requires an OLEDB provider (it's suitable for MSAccess or Oracle). Why don't you use SqlConnection? It's more efficient when using SQL Server because there is no OLEDB provider in between.
Life is 5: 3 me, 1 you.
|
|
|
|
|
Yes, you can use ODBCConnection to connect to a SQL Server database, however, you really should use SQlConnection, which is specifically written for SQL Server. ODBC connections are necessarily generic where as the SQL connection offers enhanced performance and capabilities specific to SQL Server.
only two letters away from being an asset
|
|
|
|
|
OledbConnection is not For SQL
SqlConnection is for SQL, ODBCConnection is Fine, but i suggest you use ODBCConnection
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswa Maseko wrote: i suggest you use ODBCConnection
You mean SqlConnection don't you?
|
|
|
|
|
Oops typo i meant that yes thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Yes u can use OLeDBConnection & ODBCConnection to connect with SQL 2005
but .Net provided SQLConnection class to reduce the overhead while connecting with SQL using OLeDB or ODBC
SQLConnection specifically built for SQL. So if you use SQLConnection it will save time and your application will be more efficient as compared if you ODBC or OLeDB
|
|
|
|
|
The type or namespace name 'Windows' does not exist in the namespace ' System' (are you missing an assembly reference?
This is an error occured while i try to include system.windows.form namespace.
can anyone tell me why?
|
|
|
|
|
Did you add System.Windows.Forms.dll in your references?
Life is 5: 3 me, 1 you.
|
|
|
|