Click here to Skip to main content
15,929,795 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Runtime print from asp.net Pin
Amit Kumar Chikara13-Sep-06 1:55
Amit Kumar Chikara13-Sep-06 1:55 
Questiontreeview in asp.net 2003 Pin
alialikh13-Sep-06 1:08
alialikh13-Sep-06 1:08 
AnswerRe: treeview in asp.net 2003 Pin
Sathesh Sakthivel13-Sep-06 2:05
Sathesh Sakthivel13-Sep-06 2:05 
AnswerRe: treeview in asp.net 2003 Pin
alialikh18-Sep-06 20:54
alialikh18-Sep-06 20:54 
Questionhow can i post parameters to a web page ? Pin
B.A13-Sep-06 0:44
B.A13-Sep-06 0:44 
AnswerRe: how can i post parameters to a web page ? Pin
Amit Kumar Chikara13-Sep-06 1:51
Amit Kumar Chikara13-Sep-06 1:51 
GeneralRe: how can i post parameters to a web page ? Pin
Guffa13-Sep-06 2:23
Guffa13-Sep-06 2:23 
AnswerRe: how can i post parameters to a web page ? Pin
B.A13-Sep-06 4:47
B.A13-Sep-06 4:47 
hello again ... and thank you

ok ,i find how declare parameter and post to server ...
i find it from this site :
http://en.csharp-online.net/index.php?title=HTTP_Post

and here the solve :


using System.Net;
...
string HttpPost (string uri, string parameters) {
// parameters: name1=value1&name2=value2
WebRequest webRequest = WebRequest.Create (uri);
//string ProxyString = System.Configuration.ConfigurationManager.AppSettings
// [GetConfigKey("proxy")];
//webRequest.Proxy = new WebProxy (ProxyString, true);
//Commenting out above required change to App.Config
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes (parameters);
Stream os = null;
try { // send the Post
webRequest.ContentLength = bytes.Length; //Count bytes to send
os = webRequest.GetRequestStream();
os.Write (bytes, 0, bytes.Length); //Send it
}
catch (WebException ex) {
MessageBox.Show ( ex.Message, "HttpPost: Request error",
MessageBoxButtons.OK, MessageBoxIcon.Error );
}
finally {
if (os != null) {
os.Close();
}
}

try { // get the response
WebResponse webResponse = webRequest.GetResponse();
if (webResponse == null)
{ return null; }
StreamReader sr = new StreamReader (webResponse.GetResponseStream());
return sr.ReadToEnd ().Trim ();
}
catch (WebException ex) {
MessageBox.Show ( ex.Message, "HttpPost: Response error",
MessageBoxButtons.OK, MessageBoxIcon.Error );
}
return null;
} // end HttpPost
AnswerRe: how can i post parameters to a web page ? Pin
B.A13-Sep-06 4:51
B.A13-Sep-06 4:51 
Questionjava script Pin
enjaimin13-Sep-06 0:11
enjaimin13-Sep-06 0:11 
AnswerRe: java script Pin
Ainapuram13-Sep-06 0:13
Ainapuram13-Sep-06 0:13 
AnswerRe: java script Pin
kiran kumar[Intelligroup]13-Sep-06 0:32
kiran kumar[Intelligroup]13-Sep-06 0:32 
AnswerRe: java script Pin
RichardGrimmer13-Sep-06 1:22
RichardGrimmer13-Sep-06 1:22 
AnswerRe: java script Pin
Suresh Pirsquare13-Sep-06 3:08
Suresh Pirsquare13-Sep-06 3:08 
QuestionMs-ACCESS Pin
kirthikirthi12-Sep-06 22:36
kirthikirthi12-Sep-06 22:36 
AnswerRe: Ms-ACCESS Pin
krishna1913-Sep-06 0:06
krishna1913-Sep-06 0:06 
AnswerRe: Ms-ACCESS Pin
kiran kumar[Intelligroup]13-Sep-06 0:26
kiran kumar[Intelligroup]13-Sep-06 0:26 
GeneralRe: Ms-ACCESS Pin
kirthikirthi13-Sep-06 20:18
kirthikirthi13-Sep-06 20:18 
GeneralRe: Ms-ACCESS Pin
kiran kumar[Intelligroup]13-Sep-06 23:19
kiran kumar[Intelligroup]13-Sep-06 23:19 
AnswerRe: Ms-ACCESS Pin
kiran kumar[Intelligroup]13-Sep-06 20:41
kiran kumar[Intelligroup]13-Sep-06 20:41 
GeneralRe: Ms-ACCESS Pin
kirthikirthi13-Sep-06 23:29
kirthikirthi13-Sep-06 23:29 
QuestionDatagrid Paging not working when using rowfilter on dataview Pin
psid2312-Sep-06 22:25
psid2312-Sep-06 22:25 
AnswerRe: Datagrid Paging not working when using rowfilter on dataview Pin
Amit Kumar Chikara13-Sep-06 1:58
Amit Kumar Chikara13-Sep-06 1:58 
Questionaddding rows to binded ctrls through code Pin
_tasleem12-Sep-06 22:15
_tasleem12-Sep-06 22:15 
Questiondifferents between Server.Transfer and Response.Redirect Pin
thomas_joyee12-Sep-06 21:20
thomas_joyee12-Sep-06 21:20 

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.