|
I didn't quite understand what you mean.
But, i think what your point is like this ?
<br />
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://sokim.seltekom.com/sokim/index.php?do=default");<br />
request.CookieContainer = new CookieContainer();<br />
<br />
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
First, i trying to get the cookie and then put the cookie on the next request?
WebReq.CookieContainer.Add(response.Cookies[0]);<br />
Stream PostData = WebReq.GetRequestStream();<br />
PostData.Write(buffer, 0, buffer.Length);<br />
PostData.Close();<br />
HttpWebResponse WebResp = (HttpWebResponse)WebReq.GetResponse();<br />
<br />
Stream Answer = WebResp.GetResponseStream();<br />
StreamReader _Answer = new StreamReader(Answer);<br />
vystup = _Answer.ReadToEnd();
Like that?
When i tried above code, the vystup is always NULL (no response)
|
|
|
|
|
I can't judge your code, simply because i do not use C#. But i have some knowledge on how Http works. I'm used to open a socket, program the http-protocol, and analyse the data by myself.
So let the deaf help the blind... Guess the first 4 lines let you login. You type in the ID and password. If you are granted a cookie will be placed on your computer. Now for every next request you should refer to the cookie.
The next 5 lines i don't understand. It seems you want to get the cookie what seems a good approach. But I would expect they where already in request.CookieContainer, but again im not a C# programmer.
Think some good C# programmer takes it over from me from here.... I'm sorry
Rozis
|
|
|
|
|
Yes, i'm sure that the cookie already on my computer (since i have log in manually).
What i'm trying to do is to pull the data out from the web.
the data is about sales.
the problem is, the data is too many.
if i want to do it manually, it will take a lot of time to do it,
since it has about 400 reseller and each reseller i want to pull sales data by certain date (i do this by manipulate the url). and then i extract the data out from the html table and then put the data on my database for analysis.
That's what i'm trying to accomplish.
I had mind to use php. looping through all the reseller id and using javascript to open new window presenting the sales data by an reseller on certain date. After that i must capture the data manually. so the windows is about 400 window and a lot of hours for me to capture the data and input it on my database.
Is there any suggestion? maybe with another approaches?
|
|
|
|
|
Dear friends,
I want to make application like windows Update in C#. As I know that windows update use BITS (Background intelligence services).But, I don’t know how to use BITS in C#. If any body has sample code or reference .Please let me know. Or suggest me what approach should I follow to make auto updating application in c#.
Regards,
Rajesh
rajesh
|
|
|
|
|
BITS can be disabled, and that would kill your updates even though there is an internet connection. I'd just use a plain old WebRequest .. after asking the user whether he wants to apply the new updates, of course.
But that's just what I'd do
If you really really want to use BITS, there is a .NET wrapper[^] for it.
|
|
|
|
|
|
I have creted windows application in which I am showing data in one grid.This grid having 50000 lines. I want grid data to be exported to excel .
How do I expoert to excel from data grid view ?
Thanks In advance !!!!!!!!!
|
|
|
|
|
You export your data, the easiest way is to write a csv.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
A simple google search on c# to excel got over 10 million hits.
I assume therefore, that you have read all of the relevant ones, distilled their content and attempted the task yourself.
What have you tried so far?
Where did it go wrong?
Be precise, it's annoying to have to read through lots of irrelevant code.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
|
Hi,
as d@nish said you could use System.Data.OleDb but for faster and easier work you should use some 3rd party component like GemBox spreadsheet component
|
|
|
|
|
I got the solution
http://www.codeproject.com/KB/dotnet/ExportToExcel.aspx?
|
|
|
|
|
hi all friends.i want to give 70-526 certification.for that i need some tutorials & question,dumps.so pls send me dumps to animashniit@gmail.com.
pls add subject your mail when u send the file to me.
animash
|
|
|
|
|
Hi,
This is probably a good a starting place as any [^]
Hope that helps.
Alan.
|
|
|
|
|
Try here: Preparation guide for 70-526[^]
Plus, unless you REALLY like spam, don't post your email address...
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
You know, any company worth working for, knows these things are useless and can quickly tell in interviews between programmers and people who got a certification by reading dumps
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Christian, I saw a number of your sayings against certification, as Raja collected them in his answer:
Certification on .Net Web/Windows application[^].
I want to say I could not agree more. This is wasteful, useless, but perhaps it's only useful as a little easy revenue generator for Microsoft. And a way of detection of lousy companies, those requiring or encouraging certifications for job candidates. And this is no so harmless, this is a kind of erosion of the idea of real education.
But my point is simpler than that. I think we should not answer all those questions on certifications posted on the Q&A forum, for example. We should focus more on computer science and software development. And certifications in no more than bureaucracy built around development.
—SASergey A Kryukov
|
|
|
|
|
hi all friends.i want to give 70-526 certification.for that i need some tutorials & question,dumps.so pls send me dumps to animashniit@gmail.com.
pls add subject your mail when u send the file to me.
animash
|
|
|
|
|
Hi guys.
I have some data and I'm going to generate a Graph with Crystal Report !
Could you guide me, how I can accomplish it ?
Thanks a lot.
|
|
|
|
|
Good Day!
I just have a problem that I would want to be addressed. This is with regards to using multiple webBrowser controls. As you can see, when I use multiple webBrowser controls, they tend to hang the application for a while.
I think this is a threading issue, but I am new to multithreading as well so I am looking for an easier way to fix this if possible. If not, please guide me on how I can fix this, so the webBrowser controls wont hang the application since it is important in my application to let the users manipulate the form while the webBrowser controls are running. Any ideas?
Any help will be greatly appreciated, thanx!
|
|
|
|
|
hi there
im trying to connect to usb port with c#
i'm using the usb_lib
but i can't find my device (a simple D.O.K).
i try to loop the device_index from 0-1000
but i allways get the same strDevicePath seems to be the default one.
but i dont get the strDevicePath of the D.O.K
can anyone help???
thanks.
|
|
|
|
|
My question boundaries in primitive data types, not object.
What is the differentation between Convert.ToInt32() and (int) casting ?
For example;
double test = 5.2;
int var1 = (int)test;
int var2 = Convert.ToInt32(test);
I know if I test variable initialize to 5.5
var1 = 5
var2 = 6
Another difference here?
Thanks...
|
|
|
|
|
Yes there is. If you box the double value, then Convert would work but casting will not. This happens as (int) directly tries to convert test to int without unboxing.
|
|
|
|
|
Convert.ToInt32 (and related int convertions) convert with banker's rounding whenever the argument is of type Decimal, float, or double. (i.e. if the input is between two integers, it returns the even integer.)
The (int) cast will only truncate - ie throw away the fractional part.
In addition, (int) will only work on numeric types while Convert.ToInt32 is overloaded to work with a wide range of data types.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|