|
How to delete the URL from cache entry in c#?
While navigating in IE, consider You had open
(1) http://www.google.co.in/ in the browser(IE)
and then You had opened gmail account
(2) https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fhl%3Den%26tab%3Dwm%26ui%3Dhtml%26zy%3Dl&bsv=zpwhtygjntrz&scc=1<mpl=default<mplcache=2&hl=en
and then consider You had opened
(3) http://in.yahoo.com/?p=us
in same window.
After all, If you the generally click the back button when (3) is opened, it navigates to gmail account (i.e., (2) ),
but I want the navigation should be done from (3) to (1) by clicking 'back' button.
How can I achieve this,
If I delete the URLCacheEntry, can it be achieved?
I have to do this in c#,
So I i imported the WinInet funtion from http://msdn.microsoft.com/en-us/library/aa383983(VS.85).aspx
it doesn't show any effect,
Is there any other way to achieve this?
|
|
|
|
|
help me to validate DataGridView coloumn to take only float values.
|
|
|
|
|
You mean the user can enter only numeric value cannot enter text ?
|
|
|
|
|
yes,column should allow user to enter only float values.
|
|
|
|
|
I am using the C# API to insert a xml file which is having schemaLocation attribute in it.
from the database side, we are using ODP.Net provider for oracle 10g.
ODP.Net is having full support in case of xml native functionalities and we are using non-structured xml type of storage.
Problem:
"Open cursors exceeded" exception is coming when importing more than 300 xml files into xmltype(Oracle) field with ODP.Net provider(Oracle.DataAccess.dll) using the relevant C# API for that.(I have Disposed all the resources using here).
here is the sample code:
string strFileContents = strXmlRecordContent;
if (Conn == null)
{
Conn = new Oracle.DataAccess.Client.OracleConnection(CatalogueDbConnection.ConnectionString);
}
if (Conn.State != ConnectionState.Open)
{
Conn.Open();
}
Oracle.DataAccess.Client.OracleCommand cmdInsertXmlRec = new Oracle.DataAccess.Client.OracleCommand();
cmdInsertXmlRec.Connection = Conn;
cmdInsertXmlRec.CommandText = "INSERT INTO XMLRecord (MetadataID,XMLData) VALUES(:Metadataid,:strFileContents ) ";
cmdInsertXmlRec.Parameters.Add(":Metadataid", Oracle.DataAccess.Client.OracleDbType.Int32).Value = MetadataID;
OracleXmlType Text = new OracleXmlType(Conn, doc);
cmdInsertXmlRec.Parameters.Add(":strFileContents", Oracle.DataAccess.Client.OracleDbType.XmlType).Value = Text;
cmdInsertXmlRec.ExecuteNonQuery();
if (cmdInsertXmlRec != null)
cmdInsertXmlRec.Dispose();
one main observation: cursors are opened if the xml file is having schemaLoaction attribute in it.
|
|
|
|
|
Hello. I was wondering, Im working on a TCP Server. How would I do the follow?
1.) When a client types something in the console, and its sent to the server, how would I parse that and do like an if(data == "hello") { blah blah }. How would I be able to parse the recieved string. If someone could help me I would GREATLY appreciate it. Here is my current server:
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
public class UdpSrvrSample
{
public static void Main()
{
byte[] data = new byte[1024];
IPEndPoint ipep = new IPEndPoint(IPAddress.Any, 7557);
UdpClient newsock = new UdpClient(ipep);
Console.WriteLine("Waiting for a client...");
IPEndPoint sender = new IPEndPoint(IPAddress.Any, 0);
data = newsock.Receive(ref sender);
Console.WriteLine("Connection received from {0}", sender.ToString());
string welcome = "OpticVPS Remote Administration";
data = Encoding.ASCII.GetBytes(welcome);
newsock.Send(data, data.Length, sender);
while (true)
{
data = newsock.Receive(ref sender);
Console.WriteLine(Encoding.ASCII.GetString(data, 0, data.Length));
newsock.Send(data, data.Length, sender);
}
}
}
[X] 100% HTML
[ ] 100% PHP
[ ] 100% C#
|
|
|
|
|
Seriously?
The snippet you posted shows you how to make a string from a byte array.
|
|
|
|
|
Hi all,
How can I check for past or future date. I've a DateTime value and I want to know it's either past date or a future date from the current DateTime. Can you someone help me to do this.
Thanks.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I've found the solution. Comapre method do all what I want. Thanks for looking into my question and sorry for disturbing here.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
The system is deployed on the user PC,as the usual time it runs under the user mode,once I click some menu(or button),
the system runs under the developing mode, at this moment, the programmer can redesign the system, for example,
add some buttons on the winform, and encode the code and recomplie it.
Could you please give me some suggestion or some codes for it?
Many thanks
|
|
|
|
|
Are you asking about how to write a system where the end user can redesign the UI ? If not, I have no idea what you're saying.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
yes, I want to it can be redesigned the UI without the VS.net envirnment.
Do you have any idea about it ?thanks!
|
|
|
|
|
You need to define your own format to create UI elements, and to define what they do, then write a program which can read that format, and one that writes it. You may use an xml document, for example. It's far from trivial. Creating UI is easy enough, especially if you limit it to a few types of elements, the question is, how do you define what the UI elements actually DO ?
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
|
|
|
|
|
Christian Graus,Thanks for your kind help,If you know some simple examples for reference,I am very grateful!
|
|
|
|
|
Have a read through the articles on Marc Clifton's blog[^] (or here in Code Project), paying particular attention to his articles on Declarative Programming.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
If your users are WPF-tolerant, then you can use the XamlReader[^] class like they did in this thread on the MSDN forums
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
|
I've searched for some component examples but I couldn't find what I want, it seems to be simple but i'm getting few issues to develop it.
What I would like to have is a custom component inherited from a textbox and also add a Label at runtime. so, everytime I drag & drop the textbox from the toolbox to the form it comes with a label, if i move the textboxcontrol or the label, they all move together.
Is it possible to do it instead of creating a usercontrol?
Thanks in advance!

|
|
|
|
|
Yeah, write the entire thing inheriting from Control instead.
Is there is a way to do it without creating your own control?? Nope.
|
|
|
|
|
I am working on a ultra light database for .NET.
I target small programs where using in memory datatable would be wasting too much memory but using SQL Express would require a too big install.
It could be for example used for example :
- by a client application that want to cache data coming from the server
- by a small programs like a little mp3 library, custom webbrowser to store bookmarks or a list of cached files.
It has a few features that might of interest:
- Very low memory footprint
- Very compact (45 Kb so far)
- Very fast (having no transaction support, no multi-threading support has its benefit)
- Automatic caching mechanism
- Work with garbage collector
- Supports DBF format
- Supports DBF index
There is a little demo program.
I wondered if some of you could have a look.
The program shows you a table of individuals.
The menu let you add 100 random individuals.
The index support is not really implemented well.
Once you have a few hundread you can click on the header to sort by that column, the index is created only once however, I haven't written the BTREE index deletion/update yet.
http://dbfdotnet.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=28087[^]
|
|
|
|
|
If you want opinions, write an article about it, including the source code, of course.
People will let you know what they think.
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.”
|
|
|
|
|
Pascal, I agree with Henry ... in addition, you could contrast it to for example, using a .NET wrapper over SQLite
'g'
|
|
|
|
|
I agree that you should make this an article. Another idea, which I've been bouncing around in my head, is to write a B+Tree implementation since they key to a small database is the indexing (without that, writing a flat file is very easy.) Yes, a wrapper around something like SQLite is an alternative, but three times in my career I've needed a B+Tree for a temporary index during data importing. I have one half done in C++, but got bored and moved onto other projects.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
Hi all
I’m looking for some assientance on auto initialising all public fields in a class.
I have a class with about 50+ fields. When an instance of the class is created and a value is assigned to the fields, it appends to the existing static value.
MyClass obj = new MyClass();
obj.Example = “THIS_STRING”; // This would therefore return STATIC_BEGINING_OF_STRINGTHIS_STRING which is desired.
My problem is that in obj.allRecords will only contain “STATIC_BEGINING_OF_STRINGTHIS_ STRING” and not “ANOTHER_STATIC_BEGINING_OF_STRING” plus the other 50 fields as they have not been initialised to their initial default value. I dont want to do it manually in the object as the point is that they are in the list as their default value even if unchanged.
Thanks for any help.
class MyClass {
public MyClass() { }
public List<string> allRecords = new List<string>();
private string _example = "STATIC_BEGINING_OF_STRING";
public string Example
{
get { return _example; }
set
{
_example += value;
allRecords.Add(_example);
}
}
private string _recordEnd = "ANOTHER_STATIC_BEGINING_OF_STRING";
public string RecordEnd
{
get { return _recordEnd; }
set
{
_recordEnd += value;
allRecords.Add(_recordEnd);
}
}
}
|
|
|
|