Click here to Skip to main content
15,881,588 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionCreate textbox like query editor in sql server Pin
Dot-Net-Dev18-Dec-09 0:32
Dot-Net-Dev18-Dec-09 0:32 
AnswerRe: Create textbox like query editor in sql server Pin
Ashfield18-Dec-09 1:20
Ashfield18-Dec-09 1:20 
GeneralRe: Create textbox like query editor in sql server Pin
Dot-Net-Dev18-Dec-09 19:09
Dot-Net-Dev18-Dec-09 19:09 
GeneralRe: Create textbox like query editor in sql server Pin
Ashfield18-Dec-09 20:28
Ashfield18-Dec-09 20:28 
AnswerRe: Create textbox like query editor in sql server Pin
Imran Khan Pathan18-Dec-09 1:57
Imran Khan Pathan18-Dec-09 1:57 
GeneralRe: Create textbox like query editor in sql server Pin
Dot-Net-Dev18-Dec-09 19:12
Dot-Net-Dev18-Dec-09 19:12 
QuestionUsing Proxy with SmtpClient class Pin
VikasAgarwal8417-Dec-09 23:34
VikasAgarwal8417-Dec-09 23:34 
QuestionImage upload problem... Pin
RajpootRohan17-Dec-09 22:44
professionalRajpootRohan17-Dec-09 22:44 
Hi to all,

I am using a gridview to display products with a link "view details". When the user clicks on the "view details" for a product, all the details are displayed in the detailsview control. I the edit mode , if user don't want to edit the image, then the initial path saved in the label should go. The path is going but image is not displayed. I am unable to find the problem. Here is the code:

<br />
                    <asp:TemplateField HeaderText="Image"><br />
                    <ItemTemplate><br />
                    <asp:Label ID="lblimage" runat="server" Text='<%# Eval("image") %>' /><br />
                    </ItemTemplate><br />
                    <EditItemTemplate><br />
                    <asp:Label ID="labelImage" runat="server" Text='<%# Eval("image") %>' /><br />
                    <asp:FileUpload ID="UpldImage" runat="server" /><br />
                    </EditItemTemplate><br />
                    </asp:TemplateField><br />


//To upload large image
FileUpload UpldImage = (FileUpload)DetailsView1.FindControl("UpldImage");
Label labelImage = (Label)DetailsView1.FindControl("labelImage");
string im = labelImage.Text;
if (UpldImage.HasFile)
{
    string fileName = "~/ProductImages/" + UpldImage.FileName;
    SqlDataSource2.UpdateParameters["image"].DefaultValue = fileName;
    UpldImage.SaveAs(Server.MapPath(fileName));
}
else
{
    SqlDataSource2.UpdateParameters["image"].DefaultValue = im;
    UpldImage.SaveAs(Server.MapPath(im));
}


Please assist me...where I am going wrong.

cheers,
sneha

AnswerRe: Image upload problem... Pin
Abhishek Sur17-Dec-09 23:19
professionalAbhishek Sur17-Dec-09 23:19 
GeneralRe: Image upload problem... Pin
RajpootRohan17-Dec-09 23:29
professionalRajpootRohan17-Dec-09 23:29 
GeneralRe: Image upload problem... Pin
RajpootRohan17-Dec-09 23:33
professionalRajpootRohan17-Dec-09 23:33 
GeneralRe: Image upload problem... Pin
Imran Khan Pathan18-Dec-09 2:33
Imran Khan Pathan18-Dec-09 2:33 
GeneralRe: Image upload problem... Pin
RajpootRohan19-Dec-09 0:22
professionalRajpootRohan19-Dec-09 0:22 
QuestionRegarding Animated File. Pin
shiva.kore17-Dec-09 20:38
shiva.kore17-Dec-09 20:38 
AnswerRe: Regarding Animated File. Pin
Abhishek Sur17-Dec-09 21:30
professionalAbhishek Sur17-Dec-09 21:30 
QuestionEnableEventValidation Pin
yesu prakash17-Dec-09 20:23
yesu prakash17-Dec-09 20:23 
AnswerRe: EnableEventValidation Pin
N a v a n e e t h17-Dec-09 20:54
N a v a n e e t h17-Dec-09 20:54 
Questionprint a document clicking on its link Pin
anilaabc17-Dec-09 19:30
anilaabc17-Dec-09 19:30 
AnswerRe: print a document Pin
nainakarri17-Dec-09 19:58
nainakarri17-Dec-09 19:58 
GeneralRe: print a document Pin
anilaabc17-Dec-09 20:23
anilaabc17-Dec-09 20:23 
AnswerRe: print a document Pin
m-khansari17-Dec-09 20:06
m-khansari17-Dec-09 20:06 
QuestionHOW to host wcf services in iis with multipel end points Pin
sreepavan15038517-Dec-09 16:13
sreepavan15038517-Dec-09 16:13 
AnswerRe: HOW to host wcf services in iis with multipel end points Pin
Abhijit Jana17-Dec-09 16:49
professionalAbhijit Jana17-Dec-09 16:49 
GeneralRe: HOW to host wcf services in iis with multipel end points Pin
sreepavan15038520-Dec-09 15:56
sreepavan15038520-Dec-09 15:56 
QuestionMultiple Timezones in a grid Pin
ednrg17-Dec-09 11:26
ednrg17-Dec-09 11:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.