|
You make no mention what your presentation layer is, however from the context I assume you mean a web page.
If you set the Response.ContentType to the proper file type and use Response.OutputStream it should work.
|
|
|
|
|
Sorry, yes, an ASP.Net web page. Im am OK with sending the stream to the response object once ive got it...my problem is actually getting the stream object from the middletier in the first place.
PresLayer - Requests doc id 1
AppLayer - Receives Request
- Obtains the path of the file from the db
- can open the file (filestream?)
- RETURNS THE FILE/STREAM
PresLayer - Spits stream out to response object.
My question is how i can pass the binary data back from the applayer to the preslayer. Eg, surely if i pass the filestream back (as an out parameter for example), the minute i call .Read on the front end, ill get an exception because the file actually exists on another machine ?!
|
|
|
|
|
Provided that permissions are set correctly you should be able to read the file into a stream and pass it to your presentation layer for display via Response.OutputStream
|
|
|
|
|
y dunn u pass a byte array frm the Business Layer to the presentation layer? Read the contents in the business layer into a byte array and pass that array to the presentation layer and use ur logic to display the content.
|
|
|
|
|
Hello,
I'am using System.Windows.Forms.ComponentModel to display the Attribs of my object in a Propertygrid. Please read the following code snippets to understand my problem.
Node class:
[
CategoryAttribute("Instance type"),
DescriptionAttribute("Instance of")
]
public string InstanceOf
{...}
[
CategoryAttribute("Geometry"),
DescriptionAttribute("Position")
]
public Vec3 Position
{...}
---------------------
Vec3 class
[
CategoryAttribute("Vector props"),
DescriptionAttribute("X")
]
public double X
{...}
[
CategoryAttribute("Vector props"),
DescriptionAttribute("Y")
]
public double Y
{...}
----------------
My problem is now, that the PropertyGrid displays the Attribute Node.Position as String (it just calls its ToString() function). But i want, that the grid displays the Vector's Attributes, so that I can change them by modifing the it's values in the grid.
PropertyGrid.SelectedObject = Node results in the
following:
- Geometry
Position 0,0,0
PropGrid I wish:
- Geometry
- Position 0,1,2
X 0
Y 1
Z 2
|
|
|
|
|
|
i have the .NET Framework 1.1 and i can't i can't find the aximp.exe file , i tried to reinstall the framework but nothing changed ! can anyone help????
amir
|
|
|
|
|
|
|
Hello,
I have a xml file:
<akis xmlns:sql="urn:schemas-microsoft-com:xml-sql">
<element><sql:query>SELECT @Element</sql:query></element>
<rows><sql:query>EXEC sp_ForXML @Element,'XML'</sql:query></rows>
</akis>
and I need to get the results of that.Is there any way to get them not by running the stored procedure but from the xml itself?
thaks in advance,
akis
|
|
|
|
|
Yes, you can query the database direct and have XML returned. You need to use IIS Virtual Directory Management for SQL Server. In the start menu, under SQL Server, there is a link called Configure SQL XML Support in IIS - that should get you started.
|
|
|
|
|
Hi, Am a newbie in c#. am facing a strange problem. I have a tabcontrol and on the first tab page, i have two controls laid side by side. To the first control i have set the anchor as top & left, while to the next i have set it to top and right. When i run the application on windows 2000 prof,(my dev machine) all is fine, i can see the controls as they are supposed to be. But when i open the application in windows XP, the second control has lost its right anchor and it goes beyond the tabpage and tabcontrol boundaries. If i opne the designer in the windows XP machine and may few unrelated changes and save it, it then runs normally on windows XP, but fails to work properly on windows 2000 professional. Am not able to understand what i am doing wrong.
any help please?
|
|
|
|
|
|
Changes that are unrelated to the size or anchor property. just a change like default text.
|
|
|
|
|
It seems that any changes can fix the problem because any changes in the user interface re-generate the upper part of the code which mean if there are any problemm it will be fixed so review the auto generate part of the code sometimes setting some statements befor others can play important role in the application interface
in order to solve that problem try to justify that ancode by code and set that code in a Load event to fix that problem
try it and tell me the result
Mhmoud Rawas
------------
Software Eng.
|
|
|
|
|
The auto generated code is same on both the machines. I was unable to locate any difference in the two files.
|
|
|
|
|
Hy,
I want to select item(s) in a c# ListView from code. SelectedIndices and SelectedItems methods are read only.
Thanks,
Mihai
|
|
|
|
|
listView1.Items[0].Selected = true;
listView1.Items[3].Selected = true;
listView1.Select();
|
|
|
|
|
Hi
I am using the Microsoft.Jet.OLEDB to connect to an Excel workbook
I can use the following sql to insert data into the Excel sheet (I hope my syntax is correct. I do not have the compiler with me):
String sql = “Insert INTO [Sheet1$] (Lastname, Firstname1) Values ('XXX', ’YYY’)";
OleDbCommand cmdExcel = new OleDbCommand(sql, conn);
OleDbDataReader drExcel = cmdExcel.ExecuteReader();
The problem that I have, is that for that INSERT to work those column headers (eg Lastname, Firstname1) need to exist in the workbook. I want to create a new workbook using code and insert data without having column names to insert the data under. How would I change the INSERT sql to specify in which column to insert data in (eg in A, B, etc).?
Thanks.
Kobus
|
|
|
|
|
try to use
create table NewSheet ......
or
alter table [Sheet1$] add ......
them you can use insert statement
|
|
|
|
|
I can't insert date 29-Feb-2000 or 29-Feb-2004. please tell me why?
|
|
|
|
|
|
DataType missmacth in criteria expression
|
|
|
|
|
|
Yeah!! the point is i can insert 28-Feb-2004 but 29-Feb-2004 it error. I don't know why.
|
|
|
|