Click here to Skip to main content
16,021,041 members

Comments by dA.d (Top 34 by date)

dA.d 20-Mar-13 1:13am View    
thanks for replay....
above part i used in my stored procedure but showing error can u show me how can i put the values in above query
dA.d 20-Feb-13 2:23am View    
yes..code of two button which i used as below:

protected void btnUpload_Click(object sender, EventArgs e)
{
Button btn = (Button)sender;
int Flag = 0;
string FileName = createNameForFile(btn.CommandArgument);//Returns Created File Name For the Question.
Session["QuestionId"] = btn.CommandArgument;
for (int i = 0; i < dtlViewDetails.Controls.Count; i++)
{
DataList DataList2 = (DataList)dtlViewDetails.Controls[i].FindControl("DataList2");
for (int j = 0; j < DataList2.Controls.Count; j++)
{
Label QuestionId = (Label)DataList2.Controls[j].FindControl("lblQuestionId");

Label lblHiddenFileName = (Label)DataList2.Controls[j].FindControl("lblHiddenFileName");
FileUpload Uploader = (FileUpload)DataList2.Controls[j].FindControl("fuAttachment");
LinkButton lnkView = (LinkButton)DataList2.Controls[j].FindControl("lnkView");
TextBox txtAnswerTypeDesc = (TextBox)DataList2.Controls[j].FindControl("txtAnswerTypeDesc");
Label lblerrorMessageHtmlCell = (Label)DataList2.Controls[j].FindControl("lblerrorMessageHtmlCell");
TextBox txtAttachFileDesc = (TextBox)DataList2.Controls[j].FindControl("txtAttachFileDesc");

if (lblHiddenFileName.Text == "")
{
if (Convert.ToInt32(QuestionId.Text) == Convert.ToInt32(btn.CommandArgument))
{
if (Uploader.HasFile)
{
lblerrorMessageHtmlCell.Visible = false;
FileInfo filedet = new FileInfo(Uploader.FileName);
string FileNameToCheck = Server.MapPath(DocumentPath + FileName) + filedet.Extension;
Uploader.SaveAs(Server.MapPath(DocumentPath + Uploader.FileName));
string OriginalName = Server.MapPath(DocumentPath + Uploader.FileName);
File.Copy(OriginalName, FileNameToCheck);
File.Delete(OriginalName);
lblHiddenFileName.Text = FileName + filedet.Extension;
lnkView.Visible = true;
Flag = 1;
break;
}
else
{
lblerrorMessageHtmlCell.Visible = true;
lblerrorMessageHtmlCell.Text = "No File To Upload.";
lblerrorMessageHtmlCell.ForeColor = System.Drawing.Color.Red;
Flag = 1;
break;
}
}
}
else
{
if (Uploader.HasFile)
{
lblerrorMessageHtmlCell.Visible = false;
Session["FileUploadObject"] = Uploader;
Session["FileNameToCheck"] = FileName;
Session["LabelFileName"] = lblHiddenFileName.Text;
trQuestionaries.Visible = false;
trPopupYesNo.Visible = true;
//Console.Beep(600, 300);
}
else
{
if (Convert.ToInt32(QuestionId.Text) == Convert.ToInt32(btn.CommandArgument))
{
lblerrorMessageHtmlCell.Visible = true;
lblerrorMessageHtmlCell.Text = "No File To Upload.";
lblerrorMessag
dA.d 20-Feb-13 2:16am View    
Thanks for replay..
115kb size file, but when i upload as first time its work.
dA.d 19-Feb-13 1:35am View    
Thanks for you quick replay,
my code work on local machine but on server shows the error of "ScriptResource.axd?d=" like this u have any solution for this please suggest me...
dA.d 30-May-12 6:42am View    
thanks for replay.....
suppose i am select year-2010 then shows the months like....
jan feb march apr

may june july aug

sep oct nov dec

in this format months will display with date.