i have developed the windows application form in this when i m not inserting the image it gives ne empathy path name is not legal it didnot update without image.
kindly help me what should i do

string imgloc="";


What are you trying to do? What code other than string imgloc=""; do you have?

If you are tyring to update a database record but don't have an image then use DBNull if your field accepts nulls. Otherwise, please provide more information.

A blank string is indeed not a valid path. Either you need to account for the possibility of a blank string and act accordingly, or ensure that the blank string doesn't happen.

Greetings Sheeraz_1! :)
Can you post the full code block - just the block of code using

string imgloc = "";

so we can try to assess where the issue is?


Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.