-
-
-
-
-
-
-
-
-
Is it Possible to Serialize HashTable with XMLSerializer
Skill/Topic: AdvancedA) YesB) No
-
-
-
-
-
-
-
-
-
public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate,
DropDownList ddStage, TextBox txtRemarks)
{
try
{
string str;
str ="insert into wip_articles(ArticleID,ProjectID,ProjectName,Mspageno,Tables,Images,Receiveddate,Duedate,Stage,Remarks) values('" + ddJnlCode.SelectedItem.Text + "','" + txtJnlName.Text + "','" + txtArticleID.Text + "','" + txtMspage.Text + "','" + txtTable.Text + "','" + txtImage.Text + "','" + txtRDate.Text + "','" + txtDDate.Text + "','" + ddStage.SelectedItem.Text + "','" + txtRemarks.Text + "')";
if(objsqlcon.Execute(str) == 1)
{
return true;
}
else
{
return false;
}
}
catch
{
}
}">I am getting an error as "public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks): not all code paths return a value"public bool insert(DropDownList ddJnlCode, TextBox txtJnlName, TextBox txtArticleID, TextBox txtMspage, TextBox txtTable, TextBox txtImage, TextBox txtRDate, TextBox txtDDate, DropDownList ddStage, TextBox txtRemarks) { try { string str; str ="insert into wip_articles(ArticleID,ProjectID,ProjectName,Mspageno,Tables,Images,Receiveddate,Duedate,Stage,Remarks) values('" + ddJnlCode.SelectedItem.Text + "','" + txtJnlName.Text + "','" + txtArticleID.Text + "','" + txtMspage.Text + "','" + txtTable.Text + "','" + txtImage.Text + "','" + txtRDate.Text + "','" + txtDDate.Text + "','" + ddStage.SelectedItem.Text + "','" + txtRemarks.Text + "')"; if(objsqlcon.Execute(str) == 1) { return true; } else { return false; } } catch { } }
-
-
ASP.NET Interview Questions
Ans