Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8390043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:53:00+00:00 2026-06-09T18:53:00+00:00

how to open the btnSMS.PostBackUrl with a new tab / new window? Or is

  • 0

how to open the btnSMS.PostBackUrl with a new tab / new window? Or is there anyway to go to that URL then automatically go to another page?

More information: That URL is a method to send SMS using service provider (Clickatell). But the URL got nothing other than stating if the message send was successful or not. I don’t want the user who use my ASP.NET to stuck there. I want to allow them to go back to my website after sending the message.

protected void btnSMS_Click1(object sender, EventArgs e)
{

    String HP = txtHP.Text;
    String URL = "http://api.clickatell.com/http/sendmsg?user=myuser&password=mypassword&api_id=myapi_id&to=";
    String Text = "&text=" + txtSMS.Text;
    btnSMS.PostBackUrl = URL + HP + Text;

    string username;
    //Sql Connection to access the database
    SqlConnection conn6 = new SqlConnection("MY CONNECTION");
    //Opening the Connnection
    conn6.Open();
    string mySQL;
    username = HttpContext.Current.User.Identity.Name;
    //Insert the information into the database table Login
    mySQL = "INSERT INTO Table_Message(Username, Message, Title, SendTo) VALUES('" + username + "','" + txtSMS.Text.Trim() + "','" + txtTitle.Text.Trim() + "','" + txtHP.Text.Trim() + "')";

    SqlCommand cmdAdd = new SqlCommand(mySQL, conn6);
    //Execute the sql command
    cmdAdd.ExecuteNonQuery();
    //Close the Connection
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:53:02+00:00Added an answer on June 9, 2026 at 6:53 pm

    Your button should closely reflect as below:

    <asp:Button runat="server" ID="btnSMS"  UseSubmitBehavior="false"  OnClick="btnSMS_Click1"  Text="Send/> 
    

    Then in the code-behind build your postback url and then after the submition add the following:

    protected void btnSMS_Click1(object sender, EventArgs e)
            {
    
    
     String HP = txtHP.Text;
                String URL = "http://api.clickatell.com/http/sendmsg?user=myuser&password=mypassword&api_id=myapi_id&to=";
                String Text = "&text=" + txtSMS.Text;
                string UrlFinal = URL + HP + Text;
    
                string username;
                //Sql Connection to access the database      
                SqlConnection conn6 = new SqlConnection("Data Source=19-17\\sqlexpress;" + "Initial Catalog = Suite2; Integrated Security =SSPI");
                //Opening the Connnection      
                conn6.Open();
                string mySQL;
                username = HttpContext.Current.User.Identity.Name;
                //Insert the information into the database table Login      
                mySQL = "INSERT INTO Table_Message(Username, Message, Title, Startdate, Enddate, SendTo) VALUES('" + username + "','" + txtSMS.Text.Trim() + "','" + txtTitle.Text.Trim() + "','" + txtHP.Text.Trim() + "')";
    
                SqlCommand cmdAdd = new SqlCommand(mySQL, conn6);
                //Execute the sql command      
                cmdAdd.ExecuteNonQuery();
                //Close the Connection 
    
                this.ClientScript.RegisterStartupScript(this.GetType(),
                                            "navigate",
                                            "window.open('" + UrlFinal + "');",
                                            true); 
    
            }
    

    This should open in a new windows. Alternatively one can use window.navigate as well which will open another page in the same browser.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

open Visual Studio 2010. Click File->New->Web Site... In the dialog window that opens, select
Open up Apple's Calendar app. When you name a new appointment, it automatically capitalizes
Open a watch window new DateTime(2010,01,01).ToString(h) Gives: new DateTime(2010,01,01).ToString(h) threw an exception of type
I open a new window with window.open() to redirect users to the oauth login
I open my Firefox extension window in a browser's tab. Is it possible to
How open new tab in browser(webkit). Via javascript, html or api webkit - it
I open a new window in SSMS and run this: SET ANSI_DEFAULTS ON GO
window.open() why window.open always pop up with IE , I set firefox is the
I open a html page with a myApp.js included like this: <html> <body> ......
When open a query in Microsoft project, the start date changes. Please note that,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.