|
I think when you create a DB, you set up what character set it uses, then I'd expect nvarchar and nchar to work just fine.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Hi
My db is an sql database created in the server explorer in VS 2005, I really didn't notice any charset settings, and now when I select database properties I still don't see any settings for character set.
Any idea on how to modify these settings?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Mohammad A Gdeisat wrote: My db is an sql database
Of course it is. All DBs are SQL databases. Do you mean SQL Server ?
When I right click on a DB in SQL Server management studio, there's a property called 'collation' which looks to me like the char set to use.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Yes, I meant SQL server DB.
I found the collation property in server explorer column properties, and it works just fine
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
can any one let me how can i send mail through asp.net
|
|
|
|
|
|
w209 wrote: can any one let me how can i send mail through asp.net
You've asked the same question 3 times already in the forums.
What part of 'learn how to use Google' don't you understand?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
I wrote this[^] article, just for people like you.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
|
C# and VB.NET are the same, just the syntax is different. There are online converters to help you, too.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Many thank for the lead. I will give this a try.
|
|
|
|
|
Yes this works fine - many thanks.
|
|
|
|
|
I've added Image control to ASP.NET web application project in C#. While clicking on some button I want the picture from hdd file to be displayed in it. Providing Image.ImageUrl = @"full hdd path\picture.jpg" doesnt seem to work at all. I do not want to copy the images to project folder either.
Also Image control provides only stretch mode. How to make it fit say 100x100 sized control so it keeps its aspect ratio?
chesnokov
|
|
|
|
|
Chesnokov Yuriy wrote: Image.ImageUrl = @"full hdd path\picture.jpg"
This won't work as it requires virtual path like (/images/someimage.jpg). Also it should be in the virtual directory where project is running.
Chesnokov Yuriy wrote: How to make it fit say 100x100 sized control so it keeps its aspect ratio?
It won't resize using aspect ratio. You need to create a Bitmap object with required width and height and draw the image to bitmap. Now send this to response, also set content type to image/jpg. I suggest using HTTPHandler for this.
|
|
|
|
|
How's that?
You can load bitmap from the hdd? can't you. For a dummy in ASP.NET how to show that Bitmap then with Image control or any other control on a page at specified location.
chesnokov
|
|
|
|
|
If you are going to use handler, just make the ImageUrl.Url = "imagehandler.ashx?url=the_image_path",
then in the handler :
load the bitmap as usual, and then use the context object as context.output.write(image as byte).
Otherwise you can simply use the Server class, I believe it has a method like PhysicalPath or something.
|
|
|
|
|
No I need some simple.
There is a button on the page. You click it and say 10 first images are displayed in row, column like matrix say 2x5 from some hdd place. Then you click it again and the next 10 images are displayed and so on. Do I need to put 2x5 Image controls and how to provide that handlers?
I would rather load image from a file resize it to thumbnail and put it to 2x5 grid and how to use the handlers then?
chesnokov
|
|
|
|
|
Chesnokov Yuriy wrote: You can load bitmap from the hdd? can't you.
Yes. But in ASP.NET, images resides in a location where ASP.NET has access can only be loaded. You need to use Server.MapPath(VirtualPath) . But it can't access images/files that resides out of the website space.
Chesnokov Yuriy wrote: For a dummy in ASP.NET how to show that Bitmap then with Image control or any other control on a page at specified location.
You can't set an image/bitmap directly to the image control. You are going to set the handler path, something like /ShowImage.img?name=yourimagename as image URL. You need to register img extension with IIS ISAPI mapping, write a HTTPHandler which can handle this extension. Inside handler, load file to a bitmap and do resizing. Then use your imageobject.Save(HttpContext.Response.OutputStream,imagetype). You need to set the ContentType too.
Hope it helps
|
|
|
|
|
System.Drawing.Image image = System.Drawing.Image.FromFile(@"full path\image.jpg");
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
This seems to work. But say when I click the button with that code, all controls are gone from the page and only image is displayed at the top of page.
How to display them like in photo browser, in rows and columns. Do I need to put some panel control. How to do it like thumbnail photo browser articles at codeproj.
chesnokov
|
|
|
|
|
Chesnokov Yuriy wrote: System.Drawing.Image image = System.Drawing.Image.FromFile(@"full path\image.jpg");
Response.ContentType = "image/jpeg";
image.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
Make sure you are writing this code in the handler and not in page.
Chesnokov Yuriy wrote: How to display them like in photo browser, in rows and columns
Panel won't be a good choice. Use DataList, it has a RepeatDirection[^] property, set that to the columns count you would like to display. And put image tag inside item template. Image URL will be /yourimagepath.img (hope img extension is handled by handler). So you will get something like photo browser. If you are on ASP.NET 3.5, check ListView[^] control too.
|
|
|
|
|
Hi Code project Team,
In page load default I’m showing "start time" dropdown,” End time" dropdown.
I'm giving one checkbox option to user, if user checks I’m enabling the button.
On that button click, I want to create client side dynamic controls for adding on start time, end time.
Start Time with 3 dropdown Hours, Mint, Unit (AM, PM).
End Time with 3 dropdown Hours, Mint, Unit (AM, PM).
This scenario is for measuring "SAMPLE “multiple start time, end time.
I want to calculate the duration of start, end time & show to user.
Can any one give me the idea or give me the good example to handle this issue.
Plz send the solution as soon as possible.
Thanks & regards
Shaik Mujeebuddin.
Analyst I
|
|
|
|
|
mujeeb_4m wrote: Hi Code project Team,
This is a common misunderstanding. The CP team creates the site, ordinary, unpaid people provide the answers.
Your dynamic controls need to be created before page load in order for viewstate to be restored to them. There's tons of info on google about this.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
My company used Oracle Application Express for develop application. Now we see that it isn't sufficient for us, so we have to choose between ASP and JSF. Can somebody give me one or more example where we'll see conection to oracle, implementing security access to database, work with data, controls design and another thinks to demonstrate that ASP is necessary for us. Thank You!
(Sory for my English, I study it now )
|
|
|
|
|
Nope. It's up to you to try out the different technologys to find out which works best for you. It's your company, and your applications so it's up to you to try and work out which works best for you. BTW - please use a more meaningful title than ASP.NET - this is obviously a question about ASP.NET - take a look at the name of this forum.
|
|
|
|
|
hi all,
Can anyone tell me how to pass data from code behing to data layer,
I am using asp.net with c# as code behind
Any suggestions would be welcome
Thanks
sri
|
|
|
|