|
Pete O'Hanlon,
Thank you, geat help. this helped me a lot.
|
|
|
|
|
I have a web application written using C# (visual studio 2002) which including the use of resource (only string data) but when I tried to edit the data displayed on the web page in the resource created...it makes no changes to the page when I refreshed it (or even after clearing the cache,etc). May I know how actually I can change the data so that it will reflect the changes to my web page as well? Please HELP...
Thanks in advance!
Alexia
|
|
|
|
|
I used a text file and just included the text file inside the web page by using
<!--#include virtual="/maincontent.txt"--><br>
inside the HTML code
Your resource shouldnt really matter as long as the page can access it. Check your resource and make sure it is updated properly (before the page reads it) and that all permissions are set correctly. The page will have to be refreshed too.
Hope this helps
I love programming!
|
|
|
|
|
Hi all,
I am developing a smartclient(mobile)Application.,
Here I need to make a textbox to behave in such a way that it should grow horizantally to the end of form from its normal sizeto nextline and so, once the cursor reaches the end.
I have taken normal textbox and made the workwrap to false...But I couldn't able to make the textbox to grow horzantally
Thanks,
Prashanth
|
|
|
|
|
heii for this u need t change the property of text box according to the text entering into it...
My small attempt...
|
|
|
|
|
Hi.
I want to plot the spectral diagram of a wav file onto a panel, which can be pretty long(the graph). The panel has a limited length, say 400 px. How can I add scroll bars to the Panel, so I can scroll back and forth to see the entire graph?
I know that the Panel has a property called Autoscroll, automatically adds H&V scroll bars if there are controls outside the visible area. But nothing similar happens if I programatically draw something outside the panel's client area.
Any ideas or suggestions?
Thanks.
|
|
|
|
|
Hi
Use DIV section instead of panel.
Add your diagram section inside DIV Section and you can set the size for width and height; add the style as OVERFLOW: auto;
Hope this solves your problem.
Harini
|
|
|
|
|
I forgot to mention that this is a Windows application, not a web site.
Thanks anyway.
|
|
|
|
|
Put a picture box control in a panel and set its SizeMode property to AutoSize and then set AutoScroll property of Panel to True.
Now draw your chart on Picture box instead of Panel.
However the most important point is that, in this scenario you will need to reset the width of Picture box according to the increasing size of Graph. Therefore you will have to measure the width of the drawn area and reset width of Picture Box.
Following is a small code snippet which I used to test, it draws a long string on a Picturebox and Panel will show scroll bar as expected.-
------------------Code Start------------------------------------------------------
private void PictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
string str = "JJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmJJJJJJJJJJJ";
g.DrawString(str, new Font("Arial", 14, FontStyle.Bold, GraphicsUnit.Pixel), Brushes.Black, 50, 50);
this.PictureBox1.Width = g.MeasureString(str, new Font("Arial", 14, FontStyle.Bold, GraphicsUnit.Pixel)).Width + 4;
}
-------------Code End--------------------------------------
I hope this will help you in finding the exact resolution.
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
Thank you! You saved my day and got my 5.
|
|
|
|
|
Hi,
I wish to run multiple exe's using the single object of System.Diagnostics.Process class. Is it possible?
Though the other way is to make a string array containing the file names and then loop through these filenames and pass the name in the ProcessStartInfo.
If anybody has a better solution, kindly let me know.
Thanks
-----Have A Nice Day-----
|
|
|
|
|
I am having a rather weird problem with the display of information in a standard combo box. The original problem was that there was a need to toggle between two different views for the items in the combo box (say, a long name and a mnemonic). So I added a check box to the form and configured it so that the contents of the combo box are cleared out and re-added in the selected state each time the check box's checked state changes.
Upon implementation, I noticed immediately that when toggling between the two states, the whole combo box control disappears from the form (not just goes empty) when the combo box is cleared and only reappears shortly after (presumably after the first item is re-added). Some trial and error pointed me to its AutoCompleteSource property which is set to ListItems. Changing this property to something else (say, HistoryList) avoids the disappearing combo box problem, the combo box merely becomes empty and is then filled up with the items that are re-added in (as is expected). Does anyone know a workaround for this (as I would like to keep AutoCompleteSource to ListItems)? I have tried changing the AutoCompleteSource before clearing the combo box and then resetting it after but that didn't work...
cheers!
|
|
|
|
|
Hi,
I'm trying to initialize a nullable object at runtime..for that i'm using
object childnullable = System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type);
The above one works fine for a normal nullable object but when it is a nullable array object it's throwing exception ...Plz help me to initialize that...
Koushik
|
|
|
|
|
Spunky Coder wrote: when it is a nullable array object it's throwing exception
What kind of exception? Can you post whole exception message and stack trace?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
Hi...
It's throwing - [System.ArgumentException] {"Value was invalid."}
StackTrace:
at System.Runtime.Serialization.FormatterServices.nativeGetSafeUninitializedObject(RuntimeType type)
at System.Runtime.Serialization.FormatterServices.GetSafeUninitializedObject(Type type)
The type fullname is shown as
System.Nullable`1[[System.SByte, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]][]<br />
Koushik
|
|
|
|
|
str.Replace(RegularExpression,str) method.
The replace method of string cant be used with a regular expression,and string cant be inherited.
so you can use Regex object to do this job
//
<code>string strSource = "william<william@hotmail.com>", strResult;
MatchCollection mc = Regex.Matches(strSource, @"\w+?@\w+?\.(com|net)");
strResult = mc[0].ToString();</code>
//strResult = william@hotmail.com
Hope this help!
|
|
|
|
|
william.zheng wrote: (com|net)
There are a great deal more TLD's than .net and .com
|
|
|
|
|
People only count if they have a com or net domain.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|
|
Hi, i suppose it's common question and one has been asked many times, but all answers whats i find
no convinet for me. Since what i wan't to ask you guys whats the best convinet way to validate current object in databinding before move to another(and if one not valid prohibit to move). There is exists CurrentChanged event and not CurrentChanging, how i can emulate CurrentChanging in my code. I use dataBindingNavigator for move throught records, and sets of control that linked to my DataBinding object (not datagrid so i can't use rowvalidating and cellvalidating events).
Thanks.
|
|
|
|
|
HI : The Given Code is to store the specifications of the controls which are added to a form database is access ,here global is a class , lsave,i are variables
there is no syntax error at runtime a error is coming i.e Syntax error in insert into statement i have checked many times the database format and the format of the values both are same still the error is comming i will be thankful for ur suggestions as i am struck at this point.
OleDbConnection connection = new OleDbConnection();
connection.ConnectionString = WindowsApplication1.Properties.Settings.Default.printsoftwareConnectionString;
connection.Open();
//loop for saving the positions of the labels
OleDbDataAdapter oda = new OleDbDataAdapter("select * from controlspecifications",connection);
OleDbCommandBuilder cmb1 = new OleDbCommandBuilder(oda);
DataSet ds1 = new DataSet("controlspecifications");
oda.Fill(ds1, "controlspecifications");
DataRow dr = ds1.Tables["controlspecifications"].NewRow();
for (lsave = 0; lsave <= i; lsave++)
{
dr[0] = global.projectname + "adsfsd";
dr[1] = lab[lsave].Name;
dr[2] = Convert.ToInt32(lab[lsave].Left);
dr[3] = Convert.ToInt32(lab[lsave].Top);
dr[4] = Convert.ToInt32(lab[lsave].Width);
dr[5] = Convert.ToInt32(lab[lsave].Height);
dr[6] = lab[lsave].Text;
dr[7] = lab[lsave].Font.FontFamily;
dr[8] = Convert.ToInt32(lab[lsave].Font.Size);
dr[9] = lab[lsave].ForeColor.ToString();
dr[10] = lab[lsave].BackColor.ToString();
if (lab[lsave].Font.Bold == true)
{
dr[11] = "bold";
}
else if (lab[lsave].Font.Italic == true)
{
dr[11] = "italic";
}
else if (lab[lsave].Font.Underline == true)
{
dr[11] = "underline";
}
else
{
dr[11] = "strikeout";
}
dr[12] = "dasfsad";
ds1.Tables["controlspecifications"].Rows.Add(dr);
oda.Update(ds1, "controlspecifications");
oda.Fill(ds1, "controlspecifications");
sindhu tiwari
|
|
|
|
|
Please don't post your questions in multiple forums. It's considered rude. Choose the most appropriate forum (in this case probably the SQL forum) and post there only.
Paul Marfleet
|
|
|
|
|
|
hi all! i have a string like:
str="samir < samir@hotmail.com >"
now i want to a regular expression to get the value samir@hotmail.com using
str.Replace(RegularExpression,str) method.
can any help me.
Thanks & Regards,
SAMir Nigam
|
|
|
|
|
Here you have regex that matches email adress [A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}
|
|
|
|
|
Nigam SAMir wrote: now i want to a regular expression to get the value samir@hotmail.com using
str.Replace(RegularExpression,str) method.
You can't do that.
Use the Regex.Replace method.
---
"Anything that is in the world when you're born is normal and ordinary and is just a natural part of the way the world works. Anything that's invented between when you're fifteen and thirty-five is new and exciting and revolutionary and you can probably get a career in it. Anything invented after you're thirty-five is against the natural order of things."
-- Douglas Adams
|
|
|
|