|
Really ? Only the web DataGrid does paging ? I didn't realise that.
Well, the easiest thing would still be a stored proc that takes a page number and size, but if you want to limit your database access, then I guess you'd store the full table locally, and build a datasource from it that you bind to the grid, selecting only the current page rows.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I would add a DataColumn with AutoIncrement set to true to the table, and then use a DataView and its RowFilter property to just return the records with that column from 1 to 50.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
hi all,
My Question is like this:
Our network is workgroup.Then How do we Logg on to NETWORK Computer using C#?.
I need to handle a service in other computer ..but it says that "You haven't enough previleges to access this Service Control"
So I need to hardcode user name and password of that machine.So what is the method or way to logg on to NETWORK computer..?
But our NETWORK is a WORKGROUP not a Domain.
I know there is way to logg on to other computer if our computers are in a DOMAIN..
So please any one tell me how to access workgroup computer using C#?
thanks in advance.
|
|
|
|
|
I run a workgroup at home, and in my experience, you need to either add a $ to the drive name you use in your path ( which gets you in as admin ), i.e. \\myPC\c$\My Documents\etc., or you need to set up the permissions you require on the machine you're connecting to.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thank you very much!
program jys 2003 77 60 kill Japan.
|
|
|
|
|
Do you mean the IP of the host computer (the one the app is running on?) In a Windows Forms app use this code:
string strHostName = "";
string strIP;
try
{
strHostName = Dns.GetHostName();
IPAddress [] ips = Dns.Resolve(strHostName).AddressList;
if(ips.Length >= 1)
strIP = ips[0].ToString();
else
strIP = "(error)";
}
catch
{
if(strHostName == null || strHostName.Length == 0)
strHostName = "(error)";
strIP = "(error)";
} If you are developing an ASP.NET application and you want to get the IP of the computer connecting to you, I suppose it's possible, but I have no idea.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
I means to How do I find the IP address of the Client App connecting to a dot NET remoting service(C#).
program jys 2003 77 60 kill Japan.
|
|
|
|
|
Well, then I have no idea.
This is why you should explain your question the best you can the first time. "How to get client IP" is just to vague. There are many situations where that phrase makes sense and there's no way for us to know which in particular is your situation. By asking better questions, you can be sure of getting better answers that really address your problem, and not, like in this case, an answer that took some time to write that is totally unrelated.
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
i want some information about all port
|
|
|
|
|
I live in Hobart. Hobart is a port, but not a busy one. Melbourne is a busier port, but Sydney is busier again.
If you wanted other information, be a little more specific about what you're trying to do.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Maybe he meant something like this.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
The really sad part is this is the second time he's posted this very same statement! He deleted the first one after getting a similar response.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have a big array n*n matrix in an .xls (Excel Spreadsheet) and I want to read it into the my C# which calculates the inverse of it. I am not sure how to read the xls file into a 2D array.
n is variable, i.e. it is not known beforehand. It can be 300, 400 0r 500 or any value. Basically, the user gives the input as the file name in which he has storted the matrix.
And does anyone aware of any fast and qucik algorithm by which I can check if a large matrix is singular or not.
Regards
|
|
|
|
|
Hey folks,
I am not very good at C# programming.
I want to write a piece of C# code to change the Pool size in Application pooling of a COM+ component?
Do you guys know how can I do that.
Thanks a bunch.
Tommy.
|
|
|
|
|
Hi! Im creating a form in which i retrieve data from a database and attach it to a grid. I need to have a function in which if i click the save button the results of the retrieved data will be saved as a "text" file. cane someone please tell me what's wrong with my code bcoz whenever i click my save button it doesn't save at all. here's my code:
private void btnSave_Click(object sender, System.EventArgs e)
{
OdbcConnection cnn = new OdbcConnection();
cnn.Open();
OdbcCommand cmmd = new OdbcCommand();
OdbcDataAdapter adp = new OdbcDataAdapter (cmmd);
DataSet ds_emp = new DataSet();
adp.Fill(ds_emp);
System.Text.StringBuilder sb = new System.Text.StringBuilder();
for(int i=0;i<=ds_emp.Rows.Count - 1; i++)
{
for(int q=0;q<=ds_emp.Columns.Count - 1; q++)
{
sb.Append(ds_emp.Rows[i][q].ToString());
}
sb.Append(" ");
}
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=*.txt");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.text";
System.IO.StringWriter strWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new System.Web.UI.HtmlTextWriter(strWrite);
Response.Write(sb.ToString());
}
where ds_emp is the retrived data. Is there something wrong with my code? It builds but it doesn't work. Thanx for all your replies! I appreciate it
thanx
|
|
|
|
|
I have the following URL:
http://patft.uspto.gov/netacgi/nph-Parser?Sect1=PTO2&Sect2=HITOFF&u=/netahtml/search-adv.htm&r=2&p=1&f=G&l=50&d=ptxt&S1=((teeth+OR+member)+OR+provide)&OS=+(teeth+OR+member)+OR+provide&RS=((teeth+OR+member)+OR+provide)
Accessing it with the following code snippet (which works for other sites):
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
HttpWebResponse resp = (HttpWebResponse)req.GetResponse();
throws a WebException (timeout). Accessing the same URL with IE works fine. I compared the request header sent by the code and the one sent by IE and they are identical. The user agent has been set to "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)"
I even increased the request timeout to a massively huge value and it didn't make any difference.
|
|
|
|
|
There is something wrong with the headers. I was getting this error: "The underlying connection was closed: The server committed an HTTP protocol violation." put this in your config file and it should resolve the issue.
<configuration>
<system.net>
<settings>
<httpwebrequest useunsafeheaderparsing="true">
|
|
|
|
|
Put what? It looks like you forgot to check the box below the message window that says "Do not treat <<s as HTML tags".
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Sorry dude. Here it is:
<configuration>
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing="true" />
</settings>
</system.net>
</configuration>
|
|
|
|
|
You might want to reply to the original poster with this, not me. He'll get a notification e-mail that says you replied to him that way.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Is it possible to insert a jpg,gif or a bitmap file into a crystal report programmatically? If so can someone point me in the right direction. I've been looking on the web but can't seem to find anything about it.
|
|
|
|
|
Hello!
I have an old notebook with no display (don’t ask - long story). Now I want to put it back in use by developing a Text-to-Speech-based menu, e.g. I press ‘m’ and the program outputs something like “You are in the main menu. Press 1 to do …., press 2 to do ….., …” via TTS – all just for fun. The TTS part isn’t much of a problem but I was wondering if I could reassign keys like the windows key. Essentially, I would like to globally (before Windows does) intercept any keyboard events and then pass them directly to an application of my choice or simply drop them.
Am I looking for a hook? Or do they, as I’ve read, only allow for monitoring system events but not altering or discarding them all together?
If I’m wrong with that assumption I would appreciate any help concerning hooks and especially their interop side. I’ve read that global hooks require the code to reside in a DLL? I guess this doesn’t include managed DLLs and I would have to do it in unmanaged C++.
If I’m right I’m open to any suggestions and any useful resources you can provide.
Thanks in advance.
Regards,
Florian
|
|
|
|
|
I've done something kind of similar to what your thinking of. I did it in C++ though. I found it much easier than trying to Interop the thing. You'll also be able to rebuild/customize keyboard messages easier too. If you want to eat a keyboard message, it's easy enough. You just don't pass it up the hook chain when you're done processing it, if any.
Global, low-level hooks, can be in an .EXE and still work. The latest example I used of this was to eat any Windows key message. (This effectively disables hitting Windows-E and starting Explorer, even though Group Policy disabled running it!)
You're only problem, that I see, is going to be maintaining control of focus while you send keyboard messages around.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thank you so far.
I haven't been programming C++ for 2 years now so I would prefer doing as much as possible in C#.
I guess I could write a C++ DLL and then wrapp it with some managed code.
I think I'm going to read a few MSDN articles about hooks.
|
|
|
|
|
I didn't say it couldn't be done entirely in C#, I just said I found it easier to do in C++. If you wanted to, you could write the thing in Managed C++ so it's easier to build an interface to your C# app.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|