Click here to Skip to main content
15,919,341 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Error in dgresult.rows Pin
kubben6-Jul-07 2:02
kubben6-Jul-07 2:02 
QuestionInitializeCulture()': no suitable method found to override : only problem with master page Pin
srinandan..6-Jul-07 1:03
srinandan..6-Jul-07 1:03 
Questionrating. Pin
suparichit6-Jul-07 0:54
suparichit6-Jul-07 0:54 
AnswerRe: rating. Pin
Sathesh Sakthivel6-Jul-07 0:56
Sathesh Sakthivel6-Jul-07 0:56 
GeneralRe: rating. Pin
Christian Graus6-Jul-07 1:01
protectorChristian Graus6-Jul-07 1:01 
GeneralRe: rating. Pin
Sathesh Sakthivel6-Jul-07 1:08
Sathesh Sakthivel6-Jul-07 1:08 
AnswerRe: rating. Pin
Christian Graus6-Jul-07 1:00
protectorChristian Graus6-Jul-07 1:00 
GeneralRe: rating. Pin
suparichit6-Jul-07 1:41
suparichit6-Jul-07 1:41 
thanks..i have stored my rate in database
------------------------------------------

x = rbtnRating.SelectedItem.ToString();
switch (x)
{
case "Excellent":
strRate = "5";
break;
case "Good":
strRate = "4";
break;
case "Average":
strRate = "3";
break;
case "Bad":
strRate = "2";
break;
case "Terrible":
strRate = "1";
break;
}
SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["KMSConnectionString"]);
con.Open();
string str = "insert into Rating(Rate,Authorname,Replies,QId) values('" + strRate + "','" + btnName.Text + "','" + lblReply.Text + "' ,'" + btnSno.Text + "' )";
SqlCommand cmd = new SqlCommand(str, con);
cmd.ExecuteNonQuery();
DataSet ds = new DataSet();
SqlDataAdapter da = new SqlDataAdapter(str, con);
da.Fill(ds);

but in retriving the database
------------------------------

SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["KMSConnectionString"]);
con.Open();
string sto = "select rate from rating where Authorname='" + btnName + "'";
DataSet ds1 = new DataSet();
SqlCommand com = new SqlCommand(sto, con);
String str3 = com.ExecuteNonQuery().ToString();

SqlDataAdapter da1 = new SqlDataAdapter(sto, con);
da1.Fill(ds1);
int countC = ds1.Tables[0].Rows.Count;
if (countC != 0)
{
for (int j = 0; j < countC; j++)
{

str3 += str3;

total = ((Convert.ToInt16(str3)) / (5 * countC));//here is my problem
}
}
Label1.Text = total.ToString();



harika

GeneralRe: rating. Pin
Sathesh Sakthivel6-Jul-07 1:45
Sathesh Sakthivel6-Jul-07 1:45 
GeneralRe: rating. Pin
suparichit6-Jul-07 2:07
suparichit6-Jul-07 2:07 
Questionhow to retrive file from database Pin
suparichit6-Jul-07 0:52
suparichit6-Jul-07 0:52 
AnswerRe: how to retrive file from database Pin
Sathesh Sakthivel6-Jul-07 0:55
Sathesh Sakthivel6-Jul-07 0:55 
AnswerRe: how to retrive file from database Pin
Tarik Guney6-Jul-07 5:20
Tarik Guney6-Jul-07 5:20 
QuestionCreate a custom control(dropdownlist populating Datagrid or Table of records) Pin
Jai Prakash Singh6-Jul-07 0:42
Jai Prakash Singh6-Jul-07 0:42 
AnswerRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Parwej Ahamad6-Jul-07 0:50
professionalParwej Ahamad6-Jul-07 0:50 
GeneralRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Jai Prakash Singh6-Jul-07 1:55
Jai Prakash Singh6-Jul-07 1:55 
GeneralRe: Create a custom control(dropdownlist populating Datagrid or Table of records) Pin
Parwej Ahamad9-Jul-07 0:53
professionalParwej Ahamad9-Jul-07 0:53 
QuestionA server control have not post back and have click event Pin
Piyush Vardhan Singh6-Jul-07 0:42
Piyush Vardhan Singh6-Jul-07 0:42 
AnswerRe: A server control have not post back and have click event Pin
Parwej Ahamad6-Jul-07 0:48
professionalParwej Ahamad6-Jul-07 0:48 
GeneralRe: A server control have not post back and have click event Pin
Piyush Vardhan Singh6-Jul-07 0:57
Piyush Vardhan Singh6-Jul-07 0:57 
GeneralRe: A server control have not post back and have click event Pin
Sathesh Sakthivel6-Jul-07 0:59
Sathesh Sakthivel6-Jul-07 0:59 
GeneralRe: A server control have not post back and have click event Pin
Piyush Vardhan Singh6-Jul-07 1:11
Piyush Vardhan Singh6-Jul-07 1:11 
GeneralRe: A server control have not post back and have click event Pin
Parwej Ahamad6-Jul-07 2:00
professionalParwej Ahamad6-Jul-07 2:00 
AnswerRe: A server control have not post back and have click event Pin
Tirthadip6-Jul-07 1:02
Tirthadip6-Jul-07 1:02 
GeneralRe: A server control have not post back and have click event Pin
Piyush Vardhan Singh6-Jul-07 1:23
Piyush Vardhan Singh6-Jul-07 1:23 

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.