Click here to Skip to main content
15,887,454 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Show contact page without refreshing master page Pin
Herman<T>.Instance17-May-11 4:47
Herman<T>.Instance17-May-11 4:47 
AnswerRe: Show contact page without refreshing master page Pin
Morgs Morgan8-Jun-11 0:08
Morgs Morgan8-Jun-11 0:08 
QuestionWeb.Sitemap Errors After .NET 4.0 / IIS7 Upgrade Pin
expinch17-May-11 2:59
expinch17-May-11 2:59 
QuestionUsing WildCard Character Pin
Member 455049317-May-11 1:30
Member 455049317-May-11 1:30 
AnswerRe: Using WildCard Character Pin
Herman<T>.Instance17-May-11 4:49
Herman<T>.Instance17-May-11 4:49 
AnswerRe: Using WildCard Character Pin
Shameel18-May-11 2:15
professionalShameel18-May-11 2:15 
AnswerRe: Using WildCard Character Pin
sudeshchandram20-May-11 0:25
sudeshchandram20-May-11 0:25 
QuestionHow to Do this on the Server Side in C# Pin
Vimalsoft(Pty) Ltd17-May-11 1:22
professionalVimalsoft(Pty) Ltd17-May-11 1:22 
Good Dal All

i have this aspx page

<%@ Page Language="C#" Async="true" Trace="true" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body> 
    <form runat="server" method="post"  action="https://www.vcs.co.za/vvonline/ccform.asp" >
    <asp:HiddenField ID="p1" Value="4635" runat="server" />
    <asp:HiddenField ID="p2" Value="2" runat="server" />
    <asp:HiddenField ID="p3" Value="Some Goods" runat="server" />
    <asp:HiddenField ID="p4" Value="5.00" runat="server" />
    <asp:Button ID="btnSubmit" runat="server" Text="Pay by Credit Card" 
       />
    </form>
</body>
</html>




what happens here is that on the Client side when someone clicks the Button it will do the payment and redirect to the page, i want to do this one the server side. i tried this

protected void btnSubmit_Click1(object sender, EventArgs e)
  {

      string P1 =  p1.Value;

      string P2 = p2.Value;

      string P3 = p3.Value;

      String URl = "https://www.vcs.co.za/vvonline/ccform.asp?p1=" + P1 + "&p2=" + P2 + "&p3=" + P3;
      WebClient svc = new WebClient();
      svc.UploadStringAsync(new Uri(""), "Post", "AT");
      svc.UploadStringCompleted += new UploadStringCompletedEventHandler(svc_UploadStringCompleted);


  }



and

void svc_UploadStringCompleted(object sender, UploadStringCompletedEventArgs e)
{
    String estr = e.Result;
}


You can test using that URL

Thanks
Vuyiswa Maseko,

Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.

C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/

AnswerRe: How to Do this on the Server Side in C# Pin
Herman<T>.Instance17-May-11 4:23
Herman<T>.Instance17-May-11 4:23 
AnswerRe: How to Do this on the Server Side in C# Pin
Herman<T>.Instance17-May-11 4:26
Herman<T>.Instance17-May-11 4:26 
GeneralRe: How to Do this on the Server Side in C# Pin
Vimalsoft(Pty) Ltd17-May-11 5:13
professionalVimalsoft(Pty) Ltd17-May-11 5:13 
QuestionPost and Receive a QueryString URL Pin
Vimalsoft(Pty) Ltd16-May-11 22:31
professionalVimalsoft(Pty) Ltd16-May-11 22:31 
AnswerRe: Post and Receive a QueryString URL Pin
Herman<T>.Instance17-May-11 4:50
Herman<T>.Instance17-May-11 4:50 
Questionasynchronous post-back Pin
Ali Al Omairi(Abu AlHassan)16-May-11 21:36
professionalAli Al Omairi(Abu AlHassan)16-May-11 21:36 
AnswerRe: asynchronous post-back Pin
Ravi Sant16-May-11 23:26
Ravi Sant16-May-11 23:26 
GeneralRe: asynchronous post-back Pin
Ali Al Omairi(Abu AlHassan)17-May-11 0:03
professionalAli Al Omairi(Abu AlHassan)17-May-11 0:03 
AnswerRe: asynchronous post-back Pin
Herman<T>.Instance17-May-11 4:39
Herman<T>.Instance17-May-11 4:39 
QuestionLinq-Sql for MySql Pin
Morgs Morgan16-May-11 20:50
Morgs Morgan16-May-11 20:50 
AnswerRe: Linq-Sql for MySql Pin
Parwej Ahamad16-May-11 21:19
professionalParwej Ahamad16-May-11 21:19 
GeneralRe: Linq-Sql for MySql Pin
Morgs Morgan16-May-11 21:41
Morgs Morgan16-May-11 21:41 
GeneralRe: Linq-Sql for MySql Pin
Parwej Ahamad16-May-11 22:31
professionalParwej Ahamad16-May-11 22:31 
QuestionClass Pin
netJP12L16-May-11 11:07
netJP12L16-May-11 11:07 
AnswerRe: Class Pin
thatraja16-May-11 16:01
professionalthatraja16-May-11 16:01 
AnswerRe: Class Pin
Morgs Morgan8-Jun-11 0:02
Morgs Morgan8-Jun-11 0:02 
QuestionReplacing WildCard Character Pin
Member 455049316-May-11 4:25
Member 455049316-May-11 4:25 

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.