|
You will have to write a class for HTTP Upload. Which can upload data on the given HTTP locaion.
Regards,
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
amit_chikara2002@hotmail.com
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
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
|
|
|
|
|
hello
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
|
|
|
|
|
how to add javascript in asp.net
MCA
|
|
|
|
|
Suppose u want to call the javascript function for button click event then write the code like this in page_load event
button1.attributes.add("event name","return function_name()")
Regards
Muralidhar
|
|
|
|
|
Suppose if you want to generate javascript functions at runtime(while rendering)
For example
string strScript="";
strScript+="function demo()";
strScript+="{
strScript+="alert('Hai'");
strScript+="}";
strScript+="</script">";
Page.RegisterClientScriptBlock("myscript",strScript);
Hope this is useful
|
|
|
|
|
Just add it within a script tag in the markup file as per classic ASP
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
|
|
|
|
|
Page.RegisterStartupScript("key1", "alert('hello');")
With Regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
Hi all
I am inserting data into .mdb file
But how can i increase the filed size
Means the field name is address and the filed size should = 500 char above
Help me
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
You cannot increase the field size while inserting data into it.
It has to be increased at the DB level.
kirthikirthi wrote: Hi all
I am inserting data into .mdb file
But how can i increase the filed size
Means the field name is address and the filed size should = 500 char above
Help me
Regards
|
|
|
|
|
You cannot change the database structure using .Net
because both are different.
Avunu aa signature enti "asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf" vinta ga
|
|
|
|
|
HI THX for reply
My problum is
I want to insert more data in 1 filed
But it is taking 255 char only
How can i do this any idea
THX
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
You can use MEMO datatype to store more than 255 chars in MS Access
Is that datatype working?Please let me know
|
|
|
|
|
You can use MEMO datatype to store more than 255 chars in MS Access
|
|
|
|
|
I got the thing
Thx
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
Hi,
I was displaying data in a datagrid using the dataview as the datasource for the datagrid. Paging worked properly when i used sort property on the dataview, however it failed when i used the rowfilter property on the dataview to filter records.
If anyone has faced this problem before please let me know the solution at the earliest.
Thanks & Regards,
Siddharth P
|
|
|
|
|
Row filter method returns you the collection of filterd rows. You will have to store those filtered rows in a table or Dataview. Than Bind your grid with the filtered rows dataset.
Regards,
Amit Kumar
HDISM, PGDCA, MCP, MCAD, MCSD
amit_chikara2002@hotmail.com
|
|
|
|
|
hi i want to know is ti possible to add the rows of Gridview,Repeater or any other controll through code.i m using asp.net 2.0.
Tasleem Arif
|
|
|
|
|
Hi everybody,
What are the differents between Server.Transfer and Response.Redirect
Regards,
Thomas
|
|
|
|
|
|
hi,
How to send file attachments in asp.net 1.1 with C#
Thanks and Regards,
Uma
|
|
|
|
|
You can use attachment.add function to send the attachments with a mail in asp.net.
Best Regards,
Apurva Kaushal
|
|
|
|
|
use the follwing code:
objMailMessage.Attachments.Add(New MailAttachment(Server.MapPath(filename)))
Thanks & regards,
Suresh Dayma
Everything Is Possible!
|
|
|
|
|
Hi go through this link,
http://www.systemwebmail.com/faq/2.3.aspx
Ram
|
|
|
|