|
i think i wrote something wrong.I dont mean to i want 2 Coloumn from data reader. I want SECOND Coloumn's data from data reader than write it with MessageBox.But i am getting an error like Data Type conflict.
|
|
|
|
|
Hi,
I have just switched from VS2003 to VS2008. I am using a repeater control on a web form.
When i try to personalise the control in HTML using
. I am getting a error for bgcolor!!
I think bgcolor has been superseded with something else? Can someone please tell me what i would need to do.....
Cheers
|
|
|
|
|
It is replaced by background-color css attribute
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
Thanks Ennis Ray Lynch, Jr.
how would i use a css attribute?
e.g. if i wanted to have a blue background on a field name. Id use something like bgcolor=blue.
How to you do that with a css attribute??
Cheers
|
|
|
|
|
style="background-color:blue;"
|
|
|
|
|
Thanks Pete!
Cheers
|
|
|
|
|
I usually go to http://www.w3schools.com/xhtml/default.asp[^] when I need a reference for any sort of website useful languages. They also have very usable tutorials for things like perl, javascript, css, etc. Hope this helps you in the future!
-Jeff
|
|
|
|
|
thanks!
Cheers
|
|
|
|
|
Hi
How can i run a query which will check that there is _ in the field name?
cheers
|
|
|
|
|
You could try and use the IsPunctuation method to check for a '_'.
Cheers
|
|
|
|
|
hustler2005 wrote: You could try and use the IsPunctuation method to check for a '_'.
How does that answer the question
Read my response[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Read the documentation[^] under the section 'Using Wildcards as Literals'.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi
i need it to work when running it in c# e.g.
string test0002 = "Select room_code from room_types where room_code like '_'";
but this doesnt work it seems to only look for a field called _ not containing this character??
any suggestions?
cheers
|
|
|
|
|
Did you read the documentation under the section I mentioned?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
I want to create a Reminder application (windows application using C#.net)which need to be started as soon as system gets boot up. To acheive this task I need to use windows service application but I think windows service application doesn't support GUI application So can any one plz help me out to find the solution.
My main requirement is:-
1. Application needs to be started as soon as computer started.
2. It should have a GUI.
If you know the solution then plz let me know ASAP.
Best Regards,
Chandan Kumar Gupta
|
|
|
|
|
Chandan_Kr wrote: I think windows service application doesn't support GUI application
It can. It's not good practice, but it can.
You could always put something in the startup folder to autostart.
|
|
|
|
|
I agree, you can get the path using this:
Environment.GetFolderPath(Environment.SpecialFolder.Startup); The first time you start the program (manually) you could make a shortcut to the application in this folder.
Matthew Butler
|
|
|
|
|
I have a string as
loadplaylist "playlistname=xyz";instancename=abc"
I have written regex as
[^\p{Cc}\\r\\n\\a\\e\\b\\t][\S]*[a-zA-Z0-9\p{Po}\s\p{Sm}]*[^\p{Cc}\\r\\n\\a\\e\\b\\t]
which will remove tabs, backspaces.......and many more from the leading and trailing sides of string.
But, how I can remove the tab and backspace if it is in middle of string as
loadplaylist "playlistname=\txyz";instancename\b=abc" -----\t and \b are included which is to be removed.
Please do help........
Thanks & Regards
Kapil
|
|
|
|
|
I've never used Regex before...
However why not use:
string s = " some thing ";
s = s.Replace(" ", "");
s = s.Replace("\t", "");
Is there any reason why you are using Regex?
Matthew Butler
|
|
|
|
|
First of all, why are you matching the above characters instead of just using the \w (word characters) and \s (whitespace characters) character classes? It appears you are trying to do something like the following (with slightly more control)
myString = myString.Trim(); Second, if you really want to remove things in the middle, instead of a regex do the following:
myString = myString.Replace("\t", string.Empty);
myString = myString.Replace("\b", string.Empty);
-Jeff
|
|
|
|
|
I have a method which uses regex.... shown below
<b>string pattern = "(?<before>.*)(?<junk><table class="MyTable" cellspacing="2" cellpadding="1" width="144" border="0">.*</table><!--MyTable- -->)(?<after>.*)";
string matchEvaluator = "${before} ${after}";
try
{
local_string = Regex.Replace(local_source, pattern, matchEvaluator);
}
catch (Exception er)
{
string g = er.Message;
}
string wr = HTMLWriter.htmlWriter.WriteHTMLFile(@"C:\trimExtras.html",
local_string);</after></junk></before></b>
I want to remove certain part of html page with this regex
the problem is it does not work... it takes a long time i.e hangs the app and when i write it to html file its still the same i.e does not replace any thing
<div class="ForumMod">modified on Friday, December 07, 2007 7:52:14 AM</div>
|
|
|
|
|
Question: A curiosity, doubt, or statement inquiring about something.
Did you forget something?
|
|
|
|
|
string test0002 = "Select room_code from room_types where room_code = '" + room_code + "'";
int max2;
SqlCommand cmd17 = new SqlCommand();
cmd17.Connection = con2;
cmd17.CommandText = test0002;
max2 = (int)cmd17.ExecuteNonQuery();
lbtest1.Text = max2.ToString();
hey is there a problem with the code above as its not displaying the data it is meant to, is there another way t display data from a query quickly/
cheers
|
|
|
|
|
did u get any error while running this code?
|
|
|
|
|
The return value from ExecuteNonQuery is the number of rows affected. In the case of a Select statement this will usually be zero.
You shold use ExecuteScalar to get a single return value from your select statement, or ExecuteReader to get more than one return value.
|
|
|
|