I found a very good article that describe several ways to call to java script from asp.net server side , with master page and with Ajax.
Calling JavaScript from ASP.NET
enjoy
Yaniv
This Blog is first of all memos for me!! From time to time I get exposed to new and cool stuff for developers and architects ,most of the time its a solution for a problem or tips or tricks, so, I would like to track my memos and share it with you, it can save your time and nervous, I hope you will enjoy it - by Yaniv Tzanany.
Search This Blog
Monday, May 11, 2009
Tuesday, May 5, 2009
Monday, March 30, 2009
Connect to an existing IE Browser in c#
if you like to connect to an existing IE browser and get some events , here is a code snippets to do that .
do not forget to add refrence to SHDocVw .
Yaniv
do not forget to add refrence to SHDocVw .
Yaniv
private void btnConnExisting_Click(object sender, EventArgs e)
{
SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindowsClass();
foreach (SHDocVw.InternetExplorer ie in shellWindows)
{
if (ie.LocationURL.Contains("what ever"))
{
MessageBox.Show("Location:" + ie.LocationURL);
ie.BeforeNavigate2 += new SHDocVw.DWebBrowserEvents2_BeforeNavigate2EventHandler(this.ie_BeforeNavigate2);
}
}
}
public void ie_BeforeNavigate2(object pDisp, ref object url, ref object Flags,
ref object TargetFrameName, ref object PostData, ref object Headers, ref bool Cancel)
{
MessageBox.Show("do what you want!");
}
}
Tuesday, March 24, 2009
WebBrowser control - DocumentCompleted event and Tips
All the developer familiar with the DocumentCompleted event , but you need to be aware of that if you have client side script that handle this event too or do something on the OnLoad event , you will miss the point , we are expecting to get this event after all done , but that the way it is .
i found a solution that works for me - and the credits is not mine , the idea is to call the documentcomplete event later on the same thread after the original call arrived, you can find the solution here :
Triggering DocumentCompleted after the OnLoad event .
another very good resource you can find here
Using Internet Explorer from .NET
enjoy
Yaniv
i found a solution that works for me - and the credits is not mine , the idea is to call the documentcomplete event later on the same thread after the original call arrived, you can find the solution here :
Triggering DocumentCompleted after the OnLoad event .
another very good resource you can find here
Using Internet Explorer from .NET
enjoy
Yaniv
Thursday, March 19, 2009
Read && Write To/From file c++ MFC
two simple function to read & write to/from file in c++ MFC.
Yaniv
void WriteToFile(CString data)
{
CStdioFile file("C:\\TEMP\\chinese.txt",CFile::modeCreate | CFile::modeWrite);
file.WriteString(data);
file.Close();
}
CString ReadFromFile()
{
CStdioFile file("C:\\TEMP\\chinese.txt",CFile::modeRead);
CString data;
file.ReadString(data);
file.Close();
return data;
}
Yaniv
Tuesday, March 17, 2009
See all network computers
if you want to see all network computer , you can run the next command on your windows console
net view
net view
Sunday, March 15, 2009
Windows command line
In the next link you can find all windows command line from A-Z
Command-line reference A-Z
Command-line reference A-Z
Subscribe to:
Posts (Atom)