Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
I have developed an application and successfully hosted on net4india Ltd. But after publishing it on server my page has one button and its click event is not working. other pages are working fine.

But when I run that application from local host it works fine. Why it is so?
The .aspx has an update panel also. Please help me out.
Posted
Comments
hitech_s 26-Mar-12 3:11am    
could u post u r .aspx code plz
Qureshali 26-Mar-12 3:13am    
Sure sir,
protected void btnnext_Click(object sender, EventArgs e)
{

try
{
Int32 i = grdallques.Rows.Count;
btnprev.Enabled = true;
if (Convert.ToInt32(lblqno.Text) < i)
{
//==========================================================================
/*For retrieving the last question's checked value
* and the selecting the corresponding radio button=TRUE*/
//==========================================================================
//qid = Convert.ToInt32(grdallques.Rows[Convert.ToInt32(lblqno.Text) - 1].Cells[8].Text);



qid = Convert.ToInt32(lblqno.Text) + 1;

oTestGivenEntity = new TestGivenEntity();
oTestGivenEntity = TestGivenBL.GetFromTestGivenSelectedValueForRadioBotton(qid, Global.UserId);
if (oTestGivenEntity != null)
{
if (oTestGivenEntity.OptionChecked == "A")
{
rbtnopt1.Checked = true;
rbtnopt2.Checked = false;
rbtnopt3.Checked = false;
rbtnopt4.Checked = false;
rbtnopt5.Checked = false;
}
if (oTestGivenEntity.OptionChecked == "B")
{
rbtnopt1.Checked = false;
rbtnopt2.Checked = true;
rbtnopt3.Checked = false;
rbtnopt4.Checked = false;
rbtnopt5.Checked = false;
}
if (oTestGivenEntity.OptionChecked == "C")
{
rbtnopt1.Checked = false;
rbtnopt2.Checked = false;
rbtnopt3.Checked = true;
rbtnopt4.Checked = false;
rbtnopt5.Checked = false;
}
if (oTestGivenEntity.OptionChecked == "D")
{
rbtnopt1.Checked = false;
rbtnopt2.Checked = false;
rbtnopt3.Checked = false;
rbtnopt4.Checked = true;
rbtnopt5.Checked = false;
}
if (oTestGivenEntity.OptionChecked == "E")
{
rbtnopt1.Checked = true;
rbtnopt2.Checked = false;
rbtnopt3.Checked = false;
rbtnopt4.Checked = false;
rbtnopt5.Checked = true;
}
}
else
{
/// For All radio buttons checked=FALSE
//rbtnopt1.Checked = false;
//rbtnopt2.Checked = false;
//rbtnopt3.Checked = false;
//rbtnopt4.Checked = false;
//rbtnopt5.Checked = false;
}
// For submitting the answer
// Inserting the data into TestGiven Table
if (rbtnopt1.Checked == true || rbtnopt2.Checked == true || rbtnopt3.Checked == true || rbtnopt4.Checked == true || rbtnopt5.Checked == true)
{
//Get questionId for the currently displyed question
Int32 q_ID = Convert.ToInt32(grdallques.Rows[Convert.ToInt32(lblqno.Text) - 1].Cells[8].Text);

oTestGivenEntity = new TestGivenEntity();
oTestGivenEntity.TestPaper
krumia 26-Mar-12 3:14am    
I think you should save the pages from remote and local servers and compare them. Especially examine the code related to this click event. I think you might have made some mistake in deploying files to the server.
Qureshali 26-Mar-12 3:16am    
Yes sir I have crossed check many times but it is working fine at localhost then y not on server.
senguptaamlan 26-Mar-12 3:41am    
Please check whether any other buttons are working on any of your pages..I think all the buttons are dead...

1 solution

i think an error may be generating , try to remove try catch block, and cross check it
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900