|
Yes, that's going to be your best bet.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hi all
In visual studio 6 there was a way to step over the exception handling when we r in the release mode and to step into them when it's a debug mode
that was done using macros
How can i implement that in .net 2003?
Best Regards
3ala2
|
|
|
|
|
Are you talking about preprocessor directives? I've never actually used them, but I think they do what you're talking about. There are several pages out there on how to use them. Here's the first one that I googled.
http://www.csharphelp.com/archives/archive36.html[^]
|
|
|
|
|
hi, I need to use Gaphics g = new Graphics.FromImage(bmp) but i could not find the method .FromImage. I've added namespace like
using System;<br />
using System.Data;<br />
using System.Text;<br />
using System.Web;<br />
using System.Drawing;<br />
using System.Drawing.Text;<br />
using System.Drawing.Imaging; <br />
using System.Security.Cryptography;<br />
using System.Drawing.Drawing2D;
why is it like this?
|
|
|
|
|
That is not possible. FromImage is a method, not a constructor, so you can not use it that way.
If you skip the new keyword, it will work.
---
Year happy = new Year(2007);
|
|
|
|
|
oh so i can just put it this way:
Bitmap bmp = new Bitmap(width, height, PixelFormat.Format24bppRgb);
Graphics gph = new Graphics(bmp)??
|
|
|
|
|
No, you can't. There is no public constructor for the Graphics class.
---
Year happy = new Year(2007);
|
|
|
|
|
Hi,
I'm searching for syncing two databases in web ...
In my WebApp the user should be able to sync some tables with another database ( in web )
How can i do this ?
I'm thinking of a webservice to do this ... ( is it a right way ?! )
Regards,
Hadi
|
|
|
|
|
Hi,
how to store the uploaded file(.doc,jpeg) from asp.net page to sqlserver and retriveing the stored uploaded file from sqlserver and display it on asp.net page
|
|
|
|
|
|
Thanks its great its working ,but how to safe a .doc file like how to safe users word document resume in sqlserver database and retriving it
|
|
|
|
|
The upload function is the same whatever type of document (you can store .doc files in an "Image" datatype - it's just a blob field.
The OnPageLoad function where the file is retrieved:
Assuming the uploaded file is in the table MyTable in a column called MyFile, the mime type of the file is stored in MyFileMIME and the id field is MyID
private void Page_Load(object sender, System.EventArgs e)
{
int MyID = Convert.ToInt32(Request.QueryString["MyID"]);
SqlConnection connection = new
SqlConnection (@"server=INDIA\INDIA;database=iSense;uid=sa;pwd=india");
connection.Open ();
try
{
SqlCommand command = new
SqlCommand("select myFile, myFileMime from MyTable " +
"where MyID = @MyID", connection);
command.Parameters.AddWithValue("@MyID", MyID);
byte[] myFile = null;
string myMimeType = "";
SqlDataReader reader = command.ExecuteReader();
reader.Read();
myFile = reader.GetBytes(0, 0, myFile, 0, int.MaxValue);
myMimeType = reader.GetString(1);
}
finally
{
connection.Close();
}
Response.Clear();
Response.ContentType = myMimeType;
Response.BinaryWrite(myFile);
Response.End();
}
The above function takes retrieves both the file data and the mime type from the database (which you would have stored previously. For a word doc it's something like application/word and for a jpeg it's something like image/jpg but you could google mime types for more info (I'm just doing this from memory).
The above function replaces the html in the page with the file you are retrieving, so to use the above to display an image in a web page, you would use html like this:
in MyHtmlPage.html
<img src="GetFile.aspx?MyID=12345" width="100" height="100">
where file id 12345 is an image
or to retrieve a word doc, you would just put a link to it:
in myHtmlPage.html
<a href="GetFile.aspx?MyID=12345">Download file</a>
where file id 12345 is a file to download.
One final note: the above page load function is not particularly secure (it's for demonstration purposes only). You should google for info about "sql injection attacks" and modify the data access appropriately.
Hope that helps.
|
|
|
|
|
hi
is anybody familiar with production-ready distributed/clustered cache solution for .net ?
Google helped me to found some (like ncache and scale-out-state-server), but they are over-priced
thanks anyway for your time reading that
###
|
|
|
|
|
hi every body
in my code, i bind a data to dataset then make this dataset the datasource to my datagrid.
i want to prevent some columns from appearing in the datagrid but please don`t tell me to filter it in the select query i want to prevent these columns from appearing after the dataset is bound
what can i do?
haitham
|
|
|
|
|
Hide the column in the DataGrid.
Set the columns in the designer and set visible to false for the columns you don't want displayed.
only two letters away from being an asset
|
|
|
|
|
Can you detect the back button and fire an ASP event before you navigate away? Actually, can someone show me how to fire an ASP event and also a JavaScript function call? That would be best. I'll need to do both.
As always, a URL to somewhere else is just fine with me.
|
|
|
|
|
|
hello
thanks for the time
I have just a short time programming
i have the next scene :
for example when the page is load you use a field hidden to load it with data that you usen in then side client
for example a textbox hidden you load text property with country and
depend the user activity in the side client yo have have conditions for the type the country that data's field hidden
it is a simple example because with this technique there are bad scenes
some one could say me what is the correct way to work with data
between server side y client side in asp net
thanks for the time
sorry for me english
|
|
|
|
|
|
thanks ashish
the links are very interesting
|
|
|
|
|
I have four projects and everytime if i do changes in any signature or add any new method etc in any one project then i need to remove all reference and then include them again. ....This is very painful to do this everytime during project coding stage....
Is there any way to get rid of this. I had created macro but i am not so happy with this solution....
Amit
|
|
|
|
|
Add a reference to the project rather than the assembly.
Project A needs to include output from Project B & C so you add a reference to Project A and select the project tab, then add Project B & C, provided these are all in the same solution.
only two letters away from being an asset
|
|
|
|
|
Problem with controls seeking inside DataGrid
Code : http://www.nomorepasting.com/paste.php?pasteID=72799
create controls 200-236
(method Controls.Add are invoked in line 229...
Check in 231,
but can`t find them in line 136, why?!!!!
|
|
|
|
|
International Company Now Hiring Home Workers (9261)
Earn a guaranteed income for completed work
Multiple positions available, for full details visit:
(http://www.typeinternational.com/affil/ti9261.htm)
KAPIL KHANNA
|
|
|
|
|
How can I register as a member?
<< >>
|
|
|
|