|
So I go and install this cool little tool that I have been waiting to work with and...
No project templates for:
C# Web Project or Database project
AND
I have to map to a file I cant use a DSN? WTF
I am not so sure that this was thought out well at all...who the HELL maps to a file for the database connection..?..
Anyways any help would be great, I have been everywhere looking for "extra" templates I can download to give me the stuff I want but no luck.
Thanks
Will
I hate users. Not all of them, just the ones who talk.CP member: Al Einstien
|
|
|
|
|
no one can help me on this?
I hate users. Not all of them, just the ones who talk.CP member: Al Einstien
|
|
|
|
|
Hi...
I have written a application with two lists:
- standard .NET listview
- tableXP from these web
With both of them, I have the same problem on resizing columns. When I resize, the text of the columns go crazy! the separation betwwen the letters change.
With c++ listview I don´t have this problem.
Sorry because of my english, I hope you understand my problem.
thanks
|
|
|
|
|
I was having some difficulty displaying a web page that is stored on the localhost. Look at the code below:
System.Diagnostics.Process
Process process = new Process();
process.filename = "http://localhost/profiles/page.aspx"
process.start();
Any ideas as to how to display a page that is stored on the local server. When the file name has a http://www.domainname.com beginning, then it works fine. Why doesn't it work with localhost???
|
|
|
|
|
|
When you refer to a website (in this case your localhost is one), then the page you wish to get is not a file...
url's are not considered documents. They can only be opened by passing them as arguments.
Process.Start("IExplore.exe", "www.yahoo.com");
In your case you can try:
Process.Start("IExplore.exe", "http://localhost/profiles/page.aspx");
Tell me if this works.
*** Who said nothing is impossible? I have been doing it for a long time ***
|
|
|
|
|
is there a quick and dirty way to add 'st' 'rd' 'th' to numbers?
|
|
|
|
|
public string Dirty(int number){
switch (number){
case 1:
return "1st";
case 2:
return "2nd";
case 3:
return "3rd";
default:
return number.ToString() + "th";
}
}
Dirty enough?
|
|
|
|
|
That's extremely dirty
I think there is an article about this question here on cp.com
modified 12-Sep-18 21:01pm.
|
|
|
|
|
public string Dirty(int number)
{
switch (number)
{
case 0:return "";
case 1:return "1st";
case 2:return "2nd";
case 3:return "3rd";
default:return number.ToString() + "th";
}
}
I fixed your code a little. So that if "number = 0;" it won't return "0th" but will return an empty string.
|
|
|
|
|
what about 21st, 22nd etc?
Regards,
Rob Philpott.
|
|
|
|
|
That's too clean - he wanted it dirty, remember.
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
well, dirty is fine.. but i wanted it correct too
|
|
|
|
|
To be honest I was unsure about those dates and just entered "21th" into google. Because I got over 2 mio hits i thought it must be correct.
Now I tried and "21st" and I got over 150 mio hits
|
|
|
|
|
public string Dirty(int number)
{
if (number <= 0) return "";
switch (number/10 == 1 ? number : number%10)
{
case 1: return number + "st";
case 2: return number + "nd";
case 3: return number + "rd";
default: return number + "th";
}
} :->
xacc.ide-0.1.1 released! :) Download and screenshots
-- modified at 4:16 Tuesday 27th December, 2005
|
|
|
|
|
11st? 12nd?!!
Regards,
Rob Philpott.
|
|
|
|
|
|
And don't forget 13rd
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
|
|
|
|
|
I think that for any number whenever the digit at tenth place is '1' then 'th' is always appended to the number. For all other numbers ending with 1,2,3 digits are appended with 'st','nd','rd' respectively for all other digits 'th' is appended.
And this is my code.
public string Dirty(int number)
{
int num=number%100;
int tenplace=num/10;
if(tenplace==1)
{
return number + "th";
}
switch (number%10)
{
case 1:
return number + "st";
case 2:
return number + "nd";
case 3: return number + "rd";
default: return number + "th";
}
}
|
|
|
|
|
Very nice, but unless you want it to return
-21th, or 0th, you need to add:
try
{
if (number < 1) return "";
//YOUR CODE HERE
}
catch { return ""; }
If you don't add the try/catch and the number is too big you will get an error.
|
|
|
|
|
yeh u r right. But I think 0th is valid.
instead of
number < 1
we should use
number < 0
would work better
|
|
|
|
|
i can connect to serial comm port with C# 2003 .
It's very simple.
you only need to use MScomm32.ocx .
if anyone take care , you can email to me.
|
|
|
|
|
Hi,
I am trying to get the SqlDependency to work in an application. Here is the problem:
One windows application connects to northwind database using a user login. It then diplays the data in the Employees table.
Another project is using the the login as the previous App to display the same data BUT it displays an error when it gets to da.Fill(ds, "Customer");
The error is:
Message "When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance." string
Thanks
Here is code that I am using.
ds.Clear();
SqlConnection conn = new SqlConnection(txtConnect.Text);
conn.Open();
SqlCommand cmd = new SqlCommand(txtSelect.Text, conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
//SqlDependency.Start(txtConnect.Text); //test...
SqlDependency dep = new SqlDependency(cmd);
//The ERROR is on this line...///////
da.Fill(ds, "Employees");
/////////////////////////////////////
grdDemo.DataSource = ds;
grdDemo.DataMember = "Employees";
|
|
|
|
|
im sorry to see that you're having this problem. i have a library class that does sql connections and returnes data sets, etc. you dont have to use the class but it might help to look at/implement the code and see if you get the same error. Hope this link leads you to a solution to your problem
http://www.codeproject.com/dotnet/COperationsSQL.asp
all sqlconnections, commands, data adapters, are encapsulated in this class making things a little bit easier when it comes to interfacing with a sql back end. best of luck
|
|
|
|
|
Hi,
My query is to do with the SqlDependency only.
Thanks
|
|
|
|