|
Oops!:-> I didn't even imply it.. I just noticed this for some weeks that many good posts don't get high votes anymore -excpet mine if I were around-, and I was a bit frustrated. Forgive me if you got offended. I really didn't mean you Personally.
Regards
|
|
|
|
|
Hehe. I wasn't offended.
Anyway, at least now I know!
|
|
|
|
|
Nader Elshehabi wrote: Thanks Colin. Even though I didn't ask the question, but I've been really pleased by reading your well said, well organized post.
Thank you. I very much appreciate your compliment.
|
|
|
|
|
Hi.
I have problem storing a composite structure in MS Access using relations. The class structure looks like this:
http://www.web-tech.dk/CompositeStructure.jpg[^]
It uses a composite design pattern.
Any ideas?
Programming is like Mathematics… you take ONE step at the time!
|
|
|
|
|
I am not sure you can do this in ms access. I would try the vb forum since you would be using vba which as far as I know will not support the use of classes in the way you are trying.
Just curious as to why you are trying to do this in ms Access when there are so many OO languages avalilable?
|
|
|
|
|
|
hi
i have a login control to my page, it's work good,but when i at runtime set RememberMe checkBox to true and refresh page or recompile it, the
checkbox is empty and not remember me, how to solve this problem ?
Note : my problem was solved by this Article :
http://www.codeproject.com/useritems/Remember_me_next_time.asp
but when i run my Page the following error has shown me on this line :
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
this.Login1.Focus();<br />
if (!IsPostBack)<br />
{<br />
if (Response.Cookies["myCookie"] != null)<br />
{<br />
HttpCookie cookie = Response.Cookies.Get("myCookie");<br />
string emailID = cookie.Values["Email"].ToString(); -> Object reference not set to an instance of an object.<br />
string pass = cookie.Values["Pass"].ToString();<br />
<br />
if(Membership.ValidateUser(emailID,pass))<br />
{<br />
System.Web.Security.FormsAuthentication.RedirectFromLoginPage(emailID,true);<br />
}<br />
}<br />
}<br />
}
thank
|
|
|
|
|
hi there,
i am trying to automate login using httpwebrequest it does all the work correctly but when i try to redirect to the welcome page with the cookie headers that i got from the last post it redirect me to login , this is my code, any help plz?
// making post with login data
PostData = "login_username=clude&secretkey=taamea&js_autodetect_results=1&just_logged_in=1";
Url = "http://webmail.cleanercorners.com/src/redirect.php";
sReferer = "http://webmail.cleanercorners.com/src/login.php";
webRequest = (HttpWebRequest)WebRequest.Create(Url);
webRequest.Headers["Accept-Language"] = "ar-eg"; //"en-us"; //ar-eg
//webRequest.ProtocolVersion = HttpVersion.Version11;
webRequest.AllowAutoRedirect = false;
webRequest.Referer = sReferer;
webRequest.KeepAlive = true;
//webRequest.ContentType = "";
webRequest.UserAgent = " Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)";
webRequest.Accept = "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*";
// making a post
ASCIIEncoding encoding = new ASCIIEncoding();
encodedPostData = encoding.GetBytes(PostData);
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.ContentLength = encodedPostData.Length;
Stream requestStream = null;
requestStream = webRequest.GetRequestStream();
requestStream.Write(encoding.GetBytes(PostData), 0, PostData.Length);
HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
requestStream.Close();
// getting the cookies from the response
cookies = res.Headers["Set-Cookie"] ;
string[] sCookiesParts = cookies.Split(new char[2] { ';', ',' });
string sFormatedCookies = sCookiesParts[0] + ";" + sCookiesParts[2] + ";" + sCookiesParts[6];
//HttpCookie cookie1 = new HttpCookie("Cookie", sFormatedCookies);
//Response.Cookies.Add(cookie1);
// redirect with cookies
Response.AddHeader("Cookie", sFormatedCookies);
Response.Redirect("http://webmail.cleanercorners.com/src/webmail.php");
|
|
|
|
|
hi
i want to ececute some commands in command prompt (like ipconfig or ping ip or ....) and get result from it (command prompt) and use in my app, but how to do ?
thanks
|
|
|
|
|
You can use the System.Diagnostics.Process class for this (redirecting the standard output). A detailed example is available here:
MSDN: Process.StandardOutput[^].
|
|
|
|
|
Hello everybody .
i just need to know the following:
==================================
1 - i have ADSL connection , i need to make my ip address globally accessible , On Dial up connection my ip address was globally accessible by other users on the internet but not on ADSL , i just need to know how and if using port forwarding ( i need a total explanations or links for explaining that step by step ) knowing i tried the article here on codeproject on port forwarding but it didn't work with me , i don't know why.
Human knowledge belongs to the world.
|
|
|
|
|
Usually with an aDSL connection you are given a private address and that is mapped to a global address by your ISP.
To verify, go to start run and type cmd and then ipconfig
There you will see your ip address. (private ranges start with 10. or 172.16. or 192.168. and so on)
Have a look at http://www.ippages.com/ to see your real ip address. This is the one everybody can see.
If that ip works for you, then you should need anything more configured.
If you have a router you can either make manual port forwarding and/or UPnP
Read about those http://en.wikipedia.org/wiki/Universal_Plug_and_Play and http://en.wikipedia.org/wiki/Port_forwarding
Hope i could help
And a good place to learn how to port forward on alomost any device http://portforward.com/
|
|
|
|
|
In Belgium the basic ADSL subscription gives you a different IP address every time you
log on to the ISP; a premium subscription is required if you want your IP to be
constant (so you can set up a publicly available server).
Luc Pattyn
|
|
|
|
|
Dear Friends,
How to connect SFTP(Secure FTP) using C# code?
Regards,
Sireesh
-- modified at 4:17 Sunday 31st December, 2006
|
|
|
|
|
Hi,
I have a listview with check boxes enabled. I want to delete the item when the check box is toggled.
I am happy to do this immediately or on a button control that goes thru the listbox and deletes all the checked items.
I have searched the net high and low and cannot find how to pass the index of the selected items to the delete line as in the following examples:
this.listView1.CheckedItems[a].Remove();
OR
this.listView1.SelectedItems[a].Remove();
How do I determine the index of the item to be removed?
Glen Harvy
|
|
|
|
|
Hi!
I think there's a little misconception on your side: You don't want to remove an item from the list of checked or selected items but from the listview's item list itself.
So you could write something like this:
foreach (ListViewItem it in listView1.CheckedItems)
listView1.Items.Remove(it);
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Thanks for that.
Much appreciated.
Glen Harvy
|
|
|
|
|
In my app, I create event handlers for events supplied by iTunes, like this:
itunes.OnDatabaseChangedEvent += new _IiTunesEvents_OnDatabaseChangedEventEventHandler(itunes_OnDatabaseChangedEvent);
When I no longer want to get these events, how do I do this?
I could simply set a flag and stop reacting to the events, true. But is there a more graceful way? In fact, is there a way to indicate that I no longer want the events sent?
In fact... what causes me to start receiving the events in the first place? Is it the creation of the handler, or did I start getting the events as soon as I created the iTunesApp instance?
At any rate, thanks in advance for your information.
|
|
|
|
|
You registered for receiving the event using += . If you don't want to be notified any more, simply use exactly the same line, but with the -= operator.
|
|
|
|
|
I have the following code snippet:
WebRequest request = WebRequest.Create(URL);
request.Method = "GET";
request.ContentType = "text/xml";
WebResponse response = request.GetResponse();
System.IO.Stream stream = response.GetResponseStream();
System.IO.StreamReader streamReader = new System.IO.StreamReader(stream);
String document = streamReader.ReadToEnd();
this.webBrowser1.DocumentText = document;
I have got the HTML content successful but it lack of the javascript blocks. Then I try to show it into the WebBrowser control, everything is OK except the webpage's images.
How can I solve this problem?
Thanks for your help!
Hung
|
|
|
|
|
I am trying to, in my web browser, have the show source HTML Option, but i would like it to show up in notepad like internet explorer does. How do i do this? Thanks.
|
|
|
|
|
you could try something like this:
void OpenWithNotepad(string f) {
Process proc=new Process();
proc.StartInfo.FileName=@"C:\WINDOWS\system32\notepad.exe";
proc.StartInfo.Arguments=f;
proc.StartInfo.UseShellExecute=true;
proc.Start();
}
Luc Pattyn
|
|
|
|
|
I'd figured I would need a reference, and it says I do ("the type or namespace 'Process' could not be found.( are you missing a using directive or an assembly reference?)") this error occured twice. Thanks!
|
|
|
|
|
Hi,
When scrolling in a listview in details view, the gridlines are overwriting the text.
Has anyone else seen this or is it me!
Glen Harvy
|
|
|
|
|
Hi,
is there a way to point with a string to a specific class?
I want deserialize a XML-Stream into a structure of variables.
I tried with
Score = (score)serializer.Deserialize(reader);
but all members of Score are null.
I suppose that the xml-file is not compatible with seriliation. So I want do the deserialisation by my own code.
This leeds to the question above: If I read an XML-element, how can I assign the XML-attributes to the approprieate element-class?
Ariadne
|
|
|
|