C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




How to insert for button click event


Posted Date: 09 Aug 2008      Total Responses: 1

Posted By: sathish       Member Level: Silver     Points: 1



Hi Guys
I created some of the Textbox and write the ObjectDataSource to call the insert method and insert the data in the Database.I don't know how to set the image field,see the code for button click event I write the following code for Textboxes and I don't know for the Image field.....how to do please give sample code..


PatientInsertObjDataSource.InsertParameters["PatientID"].DefaultValue = TPatientIdValue.Text.ToString();
PatientInsertObjDataSource.InsertParameters["PatientFirstName"].DefaultValue = TFirstNameValue.Text.ToString();
I am trying like this is correct....
PatientInsertObjDataSource.InsertParameters["Photo"].DefaultValue = PhotoUpload.PostedFile.InputStream;

Thanks&Regards
Mohan





Responses

Author: Saravanan Somasundaram    09 Aug 2008Member Level: SilverRating:     Points: 2

it is not possible to set the stream to parameter.
but we can create a parameter a image type, and set the posted file bytes.



Post Reply
You must Sign In to post a response.
Next : please give me the code....pls....its urgent
Previous : Doubt in the update query.
Return to Discussion Forum
Post New Message
Category: ASP.NET

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design


Contact Us    Privacy Policy    Terms Of Use