|
Hi,
I wants to redirect to another website in the webmethod.
function CallWebMethod(methodType)
{
debugger;
switch(methodType)
{
case "Select":
{
UserName.HelloWorld();
}
}
}
<asp:scriptmanager id="ScriptManager1" runat="server" xmlns:asp="#unknown">
<services>
<asp:servicereference path="UserName.asmx">
<asp:button id="Button1" runat="server" text="Button" onclientclick="CallWebMethod('Select');" xmlns:asp="#unknown">
This is in webservice file UserName
I had tried i both the ways. But didn't worked.
[WebMethod]
public string HelloWorld()
{
//HttpContext.Current.Response.Status = "301 Moved Permanently";
//HttpContext.Current.Response.AddHeader("Location", "http://digitalcolony.com");
return "Hello World";
}
[WebMethod]
public string HelloWorld()
{
//HttpContext.Current.Response.Status = "301 Moved Permanently";
// HttpContext.Current.Response.Redirect("http://google.com", false);
return "Hello World";
}
Thanks in advance.
|
|
|
|
|
Hi,
I'm not sure if I understand correctly, but you want to click on a button and redirect to a new website? This is what I would do:
public void MyMethod()
{
Response.Redirect("http://www.google.com/", true);
}
Let me know if I understood correctly.
Regards
Brendan
|
|
|
|
|
Hi all
I have a textbox(tboContent) im typinh data into and another one tboCharacters i would like to display information ie the number of text i have entered in the first textbox. I have added that to the textchanged event and set autopostback to true.
I added the control as a trigger on the Update panel but nothing changes gets displayed on the display screen until i submit the form manually(say clicking another control with postback set to true)
Does anyone know how to solve this problem.
protected void tboContent_TextChanged1(object sender, EventArgs e)
{
tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
}
Thank you.
|
|
|
|
|
can u post the full code?
Cheers!!
Brij
|
|
|
|
|
public partial class Home_Page_frmSMSTemplate: System.Web.UI.Page
{
long lngSMSID = 0;
// long lngContactID = 0;
string strUserName = "";
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
lblNewRecord.Text = "true";
strUserName = Convert.ToString(Session["UserName"]);
//strUserName = Convert.ToString(Request.QueryString["strUsername"]);
lngSMSID = Convert.ToInt64(Request.QueryString["ID"]);
LoadSMSDetail(lngSMSID);
}
else
{
lngSMSID = Convert.ToInt64(Request.QueryString["ID"]);
strUserName = Convert.ToString(Session["UserName"]);
//strUserName = Convert.ToString(Request.QueryString["strUsername"]);
}
}
private void LoadSMSDetail(long lngSMSID)
{
try
{
LoadMergeFields();
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand SqlCmd = new SqlCommand("Get_SMSTemplate", con);
SqlDataReader dtr;
SqlCmd.Parameters.AddWithValue("@SMSTemplateID", lngSMSID);
//SqlCmd.Parameters.AddWithValue("@ContactID", lngContactID);
SqlCmd.CommandType = CommandType.StoredProcedure;
dtr = SqlCmd.ExecuteReader();
while (dtr.Read())
{
tboName.Text = (string)dtr["SMSTemplateName"];
//tboSubject.Text = (string)dtr["SMSTemplateText"];
rbtnAuditor.Checked = (bool)dtr["IsScheduledAuditor"];
rbtnSite.Checked = (bool)dtr["IsScheduledSite"];
rbtnNotification.Checked = (bool)dtr["IsNotification"];
rbtnReport.Checked = (bool)dtr["IsAuditReport"];
rbtnSample.Checked = (bool)dtr["IsScheduledSamples"];
rbtnReSite.Checked = (bool)dtr["IsReScheduledSite"];
rbtnFotten.Checked = (bool)dtr["IsForgotPassword"];
rbtnNewIncident.Checked = (bool)dtr["IsNewIncident"];
rbtnIncidentReassign.Checked = (bool)dtr["IsReassignedIncident"];
rbtnReactivatedInc.Checked = (bool)dtr["IsReactivatedIncident"];
rbtnActionsNotification.Checked = (bool)dtr["IsNewAction"];
rbtnUpdateAction.Checked = (bool)dtr["IsUpdateAction"];
rbtnDeleteAction.Checked = (bool)dtr["IsDeleteAction"];
rbtnIncidentStatus.Checked = (bool)dtr["IsIncidentStatusNotification"];
rbtnEscalation.Checked = (bool)dtr["IsEscalation"];
string mystring = (string)dtr["SMSTemplateText"];
tboContent.Text = mystring; // mystring.Replace("\n", "<br>").Replace("\r", "");
//tboCPassword.Text = (string)dtr["FtpPassword"];
lblID.Text = Convert.ToString(dtr["SMSTemplateID"]);
lblLastUpdated.Text = Convert.ToDateTime(dtr["LastUpdated"]).ToLongDateString(); //FormatThisDate(rs!LastUpdated)
//lblUpdatedBy.Text = (string)dtr["UpdatedBy"];
chkActive.Checked = (bool)dtr["Active"];
lblMergeFields.Text = ">> " + tboName.Text;
lblNewRecord.Text = "false";
tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
for (int i = 0; i < cboSMSType.Items.Count; i++)
{
foreach (System.Web.UI.Control ctrl in this.Panel1.Controls)
{
if (ctrl.GetType() == typeof(System.Web.UI.WebControls.RadioButton))
{
System.Web.UI.WebControls.RadioButton ctrl1 = (System.Web.UI.WebControls.RadioButton) ctrl;
if (ctrl1.Checked == (true))
{
if (cboSMSType.Items[i].Text == ctrl1.Text)
{
cboSMSType.SelectedIndex = i;
dtr.Close();
con.Close();
return;
}
}
}
}
}
}
dtr.Close();
}
catch (Exception ex)
{
//throw;
}
con.Close();
}
private void LoadMergeFields()
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
ListItem select = new ListItem();
select.Text = "<-Select Field->";
select.Value = "0";
SqlCommand sqlcom = new SqlCommand("Get_MergeField_All", con);
sqlcom.CommandType = CommandType.StoredProcedure;
SqlDataReader dtr = sqlcom.ExecuteReader();
cboMergeField.Items.Add(select);
while (dtr.Read())
{
ListItem select1 = new ListItem();
select1.Text = (string)dtr["MergeFieldName"];
select1.Value = Convert.ToString(dtr["MergeFieldID"]);
cboMergeField.Items.Add(select1);
}
//ListItem select = new ListItem();
//select.Text = "<-Select Field->";
//select.Value = "0";
//SqlCommand sqlcom = new SqlCommand("Get_MergeField_All", con);
//sqlcom.CommandType = CommandType.StoredProcedure;
//SqlDataReader dtr = sqlcom.ExecuteReader();
//cboMergeField.Items.Add(select);
//while (dtr.Read())
//{
// ListItem select1 = new ListItem();
// select1.Text = (string)dtr["MergeFieldName"];
// select1.Value = Convert.ToString(dtr["MergeFieldID"]);
// cboMergeField.Items.Add(select1);
//}
dtr.Close();
sqlcom.Dispose();
con.Close();
}
protected void RadToolBar1_ButtonClick1(object sender, Telerik.Web.UI.RadToolBarEventArgs e)
{
if ((e.Item.Text == "Save") | (e.Item.Text == "Save & Close"))
{
try
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
if (((string)lblNewRecord.Text =="true") && (ValidateFields() == true) && (CheckExist() == false))
{
SqlCommand SqlCmd = new SqlCommand("Insert_SMSTemplate", con);
SqlCmd.CommandType = CommandType.StoredProcedure;
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCmd.Parameters.AddWithValue("@SMSTemplateName", tboName.Text);
//SqlCmd.Parameters.AddWithValue("@SMSTemplateSubject", tboSubject.Text);
SqlCmd.Parameters.AddWithValue("@SMSTemplateText", tboContent.Text);
SqlCmd.Parameters.AddWithValue("@IsScheduledAuditor", rbtnAuditor.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSite", rbtnSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsReScheduledSite", rbtnReSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsNotification", rbtnNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsAuditReport", rbtnReport.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSamples", rbtnSample.Checked);
SqlCmd.Parameters.AddWithValue("@IsForgotPassword", rbtnFotten.Checked);
SqlCmd.Parameters.AddWithValue("@IsNewIncident", rbtnNewIncident.Checked);
SqlCmd.Parameters.AddWithValue("@IsReassignedIncident", rbtnIncidentReassign.Checked);
SqlCmd.Parameters.AddWithValue("@IsReactivatedIncident", rbtnReactivatedInc.Checked);
SqlCmd.Parameters.AddWithValue("@IsActionsNotification", rbtnActionsNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsUpdateAction", rbtnUpdateAction.Checked);
SqlCmd.Parameters.AddWithValue("@IsDeleteAction", rbtnDeleteAction.Checked);
SqlCmd.Parameters.AddWithValue("@IsIncidentStatusNotification", rbtnIncidentStatus.Checked);
SqlCmd.Parameters.AddWithValue("@IsEscalation", rbtnEscalation.Checked);
SqlCmd.Parameters.AddWithValue("@LastUpdated", DateTime.Now);
SqlCmd.Parameters.AddWithValue("@UpdatedBy", strUserName);
SqlCmd.Parameters.AddWithValue("@Active", chkActive.Checked);
SqlParameter sqlParam = new SqlParameter("@SMSTemplateID", SqlDbType.BigInt);
sqlParam.Direction = ParameterDirection.Output;
SqlCmd.Parameters.Add(sqlParam);
SqlCmd.ExecuteReader();
lblID.Text = Convert.ToString(sqlParam.Value); //(Int32)SqlCmd.Parameters["@SiteID"].Value;
MessageBox.Show("SMS Template Saved Succesfully");
lblNewRecord.Text = "false";
lblMergeFields.Text = ">> " + tboName.Text;
con.Close();
if (e.Item.Text == "Save & Close")
{
string script = "window.close();";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "close", script, true);
}
}
else if (((string)lblNewRecord.Text == "false") && (ValidateFields() == true) )
{
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand SqlCmd = new SqlCommand("Update_SMSTemplate", con);
SqlCmd.CommandType = CommandType.StoredProcedure;
SqlCmd.Parameters.AddWithValue("@SMSTemplateID", Convert.ToInt64(lblID.Text));
SqlCmd.Parameters.AddWithValue("@SMSTemplateName", tboName.Text);
//SqlCmd.Parameters.AddWithValue("@SMSTemplateSubject", tboSubject.Text);
SqlCmd.Parameters.AddWithValue("@SMSTemplateText", tboContent.Text);
SqlCmd.Parameters.AddWithValue("@IsScheduledAuditor", rbtnAuditor.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSite", rbtnSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsReScheduledSite", rbtnReSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsNotification", rbtnNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsAuditReport", rbtnReport.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSamples", rbtnSample.Checked);
SqlCmd.Parameters.AddWithValue("@IsForgotPassword", rbtnFotten.Checked);
SqlCmd.Parameters.AddWithValue("@IsNewIncident", rbtnNewIncident.Checked);
SqlCmd.Parameters.AddWithValue("@IsReassignedIncident", rbtnIncidentReassign.Checked);
SqlCmd.Parameters.AddWithValue("@IsReactivatedIncident", rbtnReactivatedInc.Checked);
SqlCmd.Parameters.AddWithValue("@IsActionsNotification", rbtnActionsNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsUpdateAction", rbtnUpdateAction.Checked);
SqlCmd.Parameters.AddWithValue("@IsDeleteAction", rbtnDeleteAction.Checked);
SqlCmd.Parameters.AddWithValue("@IsIncidentStatusNotification", rbtnIncidentStatus.Checked);
SqlCmd.Parameters.AddWithValue("@IsEscalation", rbtnEscalation.Checked);
SqlCmd.Parameters.AddWithValue("@LastUpdated", DateTime.Now);
SqlCmd.Parameters.AddWithValue("@UpdatedBy", strUserName);
SqlCmd.Parameters.AddWithValue("@Active", chkActive.Checked);
SqlCmd.ExecuteReader();
MessageBox.Show("SMS Template Updated Succesfully");
lblNewRecord.Text = "false";
lblMergeFields.Text = ">> " + tboName.Text;
con.Close();
//InsertSiteContact(lngSiteID);
con.Close();
if (e.Item.Text == "Save & Close")
{
string script = "window.close();";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "close", script, true);
}
}
}
catch (Exception ex)
{
//throw;
}
}
else if (e.Item.Text == "Delete")
{
//SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
if (con.State == ConnectionState.Closed)
{
con.Open();
}
SqlCommand SqlCmd = new SqlCommand("Update_SMSTemplateSetInactive", con);
SqlCmd.CommandType = CommandType.StoredProcedure;
//con.Open();
SqlCmd.Parameters.AddWithValue("@SMSTemplateID", Convert.ToString(lblID.Text));
SqlCmd.Parameters.AddWithValue("@UpdatedBy", strUserName);
SqlCmd.Parameters.AddWithValue("@LastUpdated", lblLastUpdated.Text);
int intMyCount = SqlCmd.ExecuteNonQuery();
if (intMyCount > 0)
{
//Session["AddNewRecord"] = "true";
lblNewRecord.Text = "true";
tboName.Text = "";
cboMergeField.SelectedIndex = 0;
cboSMSType.SelectedIndex = 0;
//rbtnAllign.ClearSelection();
lblMergeFields.Text = "";
lblID.Text = "0";
//lblUpdatedBy.Text = "";
tboContent.Text = "";
MessageBox.Show("Template Deleted Succesfully");
// LoadListBox();
}
con.Close();
SqlCmd.Dispose();
}
else if (e.Item.Text == "New")
{
lblNewRecord.Text = "true";
tboName.Text = "";
lblID.Text = "0";
tboContent.Text = "";
cboMergeField.SelectedIndex = 0;
cboSMSType.SelectedIndex = 0;
lblMergeFields.Text = "";
tboContent.Text = "";
//rbtnAllign.ClearSelection();
}
}
private bool ValidateFields()
{
bool valid = false;
if ((tboName.Text == ""))
{
valid = false;
MessageBox.Show("Mandatory Field Required");
return valid;
}
else
{
valid = true;
}
return valid;
}
private bool CheckExist()
{
bool Exist = false;
if (con.State == ConnectionState.Closed)
{
con.Open();
}
//SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
SqlCommand SqlCmd = new SqlCommand("Get_SMSTemplateCheckSMSTypeExists", con);
SqlDataReader dtr;
//Session["AddNewRecord"] = "false";
SqlCmd.CommandType = CommandType.StoredProcedure;
SqlCmd.Parameters.AddWithValue("@IsScheduledAuditor", rbtnAuditor.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSite", rbtnSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsReScheduledSite", rbtnReSite.Checked);
SqlCmd.Parameters.AddWithValue("@IsNotification", rbtnNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsAuditReport", rbtnReport.Checked);
SqlCmd.Parameters.AddWithValue("@IsScheduledSamples", rbtnSample.Checked);
SqlCmd.Parameters.AddWithValue("@IsForgotPassword", rbtnFotten.Checked);
SqlCmd.Parameters.AddWithValue("@IsNewIncident", rbtnNewIncident.Checked);
SqlCmd.Parameters.AddWithValue("@IsReassignedIncident", rbtnIncidentReassign.Checked);
SqlCmd.Parameters.AddWithValue("@IsReactivatedIncident", rbtnReactivatedInc.Checked);
SqlCmd.Parameters.AddWithValue("@IsActionsNotification", rbtnActionsNotification.Checked);
SqlCmd.Parameters.AddWithValue("@IsIncidentStatusNotification", rbtnIncidentStatus.Checked);
SqlCmd.Parameters.AddWithValue("@IsEscalation", rbtnEscalation.Checked);
dtr = SqlCmd.ExecuteReader();
while (dtr.Read())
{
Exist = true;
MessageBox.Show("Record Already Exist");
return Exist;
}
con.Close();
dtr.Close();
return Exist;
}
public static bool IsNumeric(string anyString)
{
if (anyString == "")
{
anyString = "0";
}
if (anyString == null)
{
anyString = "";
}
if (anyString.Length > 0)
{
double dummyOut = new double();
System.Globalization.CultureInfo cultureInfo = new System.Globalization.CultureInfo("en-US", true);
return Double.TryParse(anyString, System.Globalization.NumberStyles.Any, cultureInfo.NumberFormat, out dummyOut);
}
else { return false; }
}
protected void rbtnAllign_SelectedIndexChanged(object sender, EventArgs e)
{
//rbtnAllign.Items.Add(
}
protected void btnTest_Click(object sender, EventArgs e)
{
//Application.DoEvents();
}
protected void btnTesting_Click(object sender, EventArgs e)
{
// uploadFile(tboSubject.Text, tboName.Text, tboUserName.Text, tboPassword.Text);
}
protected void btnAdd_Click(object sender, EventArgs e)
{
// tboName.paste
//btnAdd.Attributes.Add("onclick", "ubbc(" + cboMergeField.SelectedItem.Text.ToString() + ")");
}
protected void cboMergeField_SelectedIndexChanged(object sender, EventArgs e)
{
//MID.Text = cboMergeField.SelectedItem.Text;
}
protected void rbtnNotification_CheckedChanged(object sender, EventArgs e)
{
//rbtnAuditor.Checked = false;
//rbtnSite.Checked = false;
//rbtnReSite.Checked = false;
////rbtnNotification.Checked = false;
//rbtnReport.Checked = false;
//rbtnSample.Checked = false;
}
protected void rbtnReport_CheckedChanged(object sender, EventArgs e)
{
//rbtnAuditor.Checked = false;
//rbtnSite.Checked = false;
//rbtnReSite.Checked = false;
//rbtnNotification.Checked = false;
////rbtnReport.Checked = false;
//rbtnSample.Checked = false;
}
protected void rbtnSite_CheckedChanged(object sender, EventArgs e)
{
//rbtnAuditor.Checked = false;
////rbtnSite.Checked = false;
//rbtnReSite.Checked = false;
//rbtnNotification.Checked = false;
//rbtnReport.Checked = false;
//rbtnSample.Checked = false;
}
protected void rbtnReSite_CheckedChanged(object sender, EventArgs e)
{
//rbtnAuditor.Checked = false;
//rbtnSite.Checked = false;
////rbtnReSite.Checked = false;
//rbtnNotification.Checked = false;
//rbtnReport.Checked = false;
//rbtnSample.Checked = false;
}
protected void rbtnAuditor_CheckedChanged(object sender, EventArgs e)
{
//// rbtnAuditor.Checked = false;
//rbtnSite.Checked = false;
//rbtnReSite.Checked = false;
//rbtnNotification.Checked = false;
//rbtnReport.Checked = false;
//rbtnSample.Checked = false;
}
protected void rbtnSample_CheckedChanged(object sender, EventArgs e)
{
//rbtnAuditor.Checked = false;
//rbtnSite.Checked = false;
//rbtnReSite.Checked = false;
//rbtnNotification.Checked = false;
//rbtnReport.Checked = false;
// rbtnSample.Checked = false;
}
protected void cboSMSType_SelectedIndexChanged(object o, RadComboBoxSelectedIndexChangedEventArgs e)
{
if (cboSMSType.SelectedItem.Text == "Audit Aproved Notification")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = true;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Audit Report")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = true;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Delete Action")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = true;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Update Action")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = true;
}
else if (cboSMSType.SelectedItem.Text == "Schedule Site")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = true;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Schedule Sample")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = true;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Schedule Auditor")
{
rbtnAuditor.Checked = true;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
if (cboSMSType.SelectedItem.Text == "ReSchedule Site")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = true;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Incident Status Notification")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnIncidentStatus.Checked = true;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
//rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Incident ReActivation")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = true;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Incident ReAssignment")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnIncidentReassign.Checked = true;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Action Notification")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = true;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Incident Notification")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = true;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Escalation Notification")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = true;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Password Forgotten")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = false;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = true;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
else if (cboSMSType.SelectedItem.Text == "Schedule Sample")
{
rbtnAuditor.Checked = false;
rbtnSite.Checked = false;
rbtnReSite.Checked = false;
rbtnNotification.Checked = false;
rbtnReport.Checked = false;
rbtnSample.Checked = true;
rbtnNewIncident.Checked = false;
rbtnReactivatedInc.Checked = false;
rbtnActionsNotification.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnEscalation.Checked = false;
rbtnFotten.Checked = false;
rbtnIncidentStatus.Checked = false;
rbtnIncidentReassign.Checked = false;
rbtnDeleteAction.Checked = false;
rbtnUpdateAction.Checked = false;
}
}
protected void tboContent_TextChanged(object sender, EventArgs e)
{
tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
}
protected void tboContent_TextChanged1(object sender, EventArgs e)
{
tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
}
protected void tboContent_DataBinding(object sender, EventArgs e)
{
tboCharacters.Text = Convert.ToString(160 - Convert.ToInt64(tboContent.Text.Length - 1));
}
protected void tboContent_Init(object sender, EventArgs e)
{
}
protected void tboContent_PreRender(object sender, EventArgs e)
{
}
}
|
|
|
|
|
What program will let me quickly create a text link from a document to
a specific portion of a MP3 or Windows Media file, play the linked
section, and then stop without having to chop the audio file into a
bunch of little files (the equivalent of bookmarking and highlighting
a passage in the book - you want to quickly move to and read a
specific piece of information without having to cut the book up into a
bunch of pieces)?
For example, I have a audio lecture recorded and downloaded to my
computer that I want to link portions of to the notes from the
lecture.
- I want to be able to QUICKLY link the text from my notes to specific
portions of the lecture that is related to the notes.
- Once the link is setup, it should lead to a specific
place/"bookmark" in the lecture/audio file, play the "highlighted"
audio, and then stop.
- The original audio will remain in tact - not need to be chopped into
a bunch of little files.
- The bookmarking, highlighting, and linking has to be quick and
intuitive.
|
|
|
|
|
Nothing to do with asp.net and stop cross posting!
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hello , my problem is that i added some buttons Programmatically and i don't want them to postback the page .. just walla execute the javascriptcode
how can i desactivate this property :
ps: buttons are in a panel with : runat="server".
<br />
foreach (Promotion promotion in promotions)<br />
{<br />
button = new Button();<br />
button.ID = "button" + i;<br />
button.CssClass = "ContextMenuItem";<br />
button.OnClientClick = "javascript:function(this);";<br />
i++;<br />
button.Text = promotion.Value.ToString();<br />
ValueListPanel.Controls.Add(button);<br />
}
|
|
|
|
|
Why are you not using HTML buttons?
Cheers!!
Brij
|
|
|
|
|
Hi,
1) If you need the asp.net button only then -
Make sure your Javascript function returns false or write like this
button.OnClientClick = "javascript:function(this); return false;";
2) If you can use a HtmlButton then -
HtmlInputButton somebuttonhtml = new HtmlInputButton();
somehtmlbutton.ID = "somehtmlbutton";
somehtmlbutton.Value = "ContextMenuItem";
somehtmlbutton.Attributes.Add("onclick", "javascript:function(this);")
ValueListPanel.Controls.Add(somehtmlbutton);
I suggest to use HtmlButton as it satisfies your requirement and it is light weight.
Hope this will help.
Thanks,
Padmanabh
|
|
|
|
|
Hi
I have a Server created in windows application and the server wil raise events at particular intervals.. i need help ... i am not sure whether we can track the events raised in the server in my ASp.net Application..My sever wil be firing some events to update the live prices.. Can any one tel me how to capture the evets in asp.net raised from windows application...
|
|
|
|
|
Hi all,
I am developing a website for online land leasing.I have to use online payment facility using paypal.How can I integrate it securly.Or I should use some other option.
Any help is appreciated.
|
|
|
|
|
If you look at the Paypal FAQs it tells you all about it.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
actually I wanted to know whether I should go for paypal or there ia a better way.
|
|
|
|
|
Personally I would offer as many payment options as possible - Paypal, Nochex etc etc
Bob
Ashfield Consultants Ltd
|
|
|
|
|
You mean I should offer as many options as possible to my customers. Ok I'll try for that if i can do it in time limit.
thanks.
|
|
|
|
|
Thats exactly what I mean. If they want to buy, make it as easy as possible.
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi All,
I want to develop a system where sites can excahnge their links to increase traffic on their sites.If Anyone can Help me????????
modified on Wednesday, November 12, 2008 6:02 AM
|
|
|
|
|
|
1. register the domain
2. Find a host
3. Write your web pages
Enough help?
Bob
Ashfield Consultants Ltd
|
|
|
|
|
Hi
my problem is that on paging in grid view i have to change the page url with grid view page no eg:
asc.aspx?page=1
on grideview page change
url: asc.aspx?page=2
|
|
|
|
|
|
I've got an object:
<object id="Object" style="left: 1px; position: absolute; top: 1px" height="1">
width="1" classid="Classes.dll#Classes.Class1" viewastext>
</object>
How should I refer to this object, to call a method? For example - Object.Method()
|
|
|
|
|
Hi All,
I have a download now button on aspx page, by clicking it need to prompt user to save the file which a movie file at server.
i am using following code....
string path = Server.MapPath("Movie/movie.zip");
System.IO.FileInfo file = new System.IO.FileInfo(path);
if (file.Exists)
{
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/zip";
Response.WriteFile(file.FullName);
Response.End();
}
this code is working fine in local system...but giving problem when i upload it in to my hosting server.
Please help me regrading this.
Pradeep Reddy
|
|
|
|
|
when u load movie on hosting server. which folder store this movie. full security of conrol that folder.
|
|
|
|
|