1
Answer

displaying a whole table from the database

Farhana Khan

Farhana Khan

12y
917
1
I am having a table in my database named Feedbacks and i need to diplay in the page of admin when admin will be going to click on the view feedback button then the whole feedback table with the buttons reply,add delete for each row should be displayed. The columns in my feedback table were commenton,commentabout,your comment,,etc
Answers (1)
0
kalu singh rao

kalu singh rao

NA 6.4k 63.9k 8y
You can check by this code
 
Method 1
 
if(!String.IsNullOrEmpty(txtContent.Text)){
// it is true
}
else
{
 // it is false
}
 
Method 2
 
 if(txtContent.Text != "")
{

}
 
Method 3

if (txtContent != string.Empty)
{

}
 
Accepted
0
Nilesh Sawardekar

Nilesh Sawardekar

NA 1.4k 15.2k 8y
Hello,
Thanks for accepting answer. For new question, ask same in new. with your code.
0
Joma Alrzini

Joma Alrzini

NA 61 7.9k 8y
thanks Kalu and Nilesh
I works fine but in my code above when I click on the button to submit to database the whole page is refreshed I do need to stop that I tried with updatepanel but I could not I read about ajax but I have no idea how to do it
please help me it f you have any example
I appreciate that very much
0
Nilesh Sawardekar

Nilesh Sawardekar

NA 1.4k 15.2k 8y
if you want to restrict user from saving when txtcontent is null then you can use validation control, else write your query in if (txtContent.text !="").