|
Hi.
To get newlines in the displayet data on the site, I just replaced "newline" with <br /> like this:
txtContent.Text.Replace(Environment.NewLine, "<br />")
-- modified at 6:35 Wednesday 29th March, 2006
|
|
|
|
|
In which column you have to save data with new lines?
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
Hi all:
I need a password textbox. But I can't find it in the toolbox and there is not a property to convert the plain textbox to a password field. Does anybody have a solution for this problem please?
Thanks in advance!!!
Asura
|
|
|
|
|
Right-click on the textbox and select "Properties".
There is an option labelled "TextMode".
This has 3 choices: select Password and you're done.
www.merrens.com www.bkmrx.com
You can ignore relatives but the neighbours live next door
|
|
|
|
|
You can use the property PasswordChar of a textBox.
TextBox1.PasswordChar = "*";
|
|
|
|
|
drag and drop one textbox from toolbox and look in proprties u have proprty called PasswordChar. set asterix character or another one by you...
_____________________
Proud to be Albanian
_____________________
|
|
|
|
|
hi there
alot of people told me, including some assitants on our faculty, that if i want to use methods on diferent programming languages is, to use SOAP standard, which also is the best option i would like to use.
so let me give you few information on what i want to use first:
i have an XML file with alot of data- let's say it is the data of URL links to diferent informational sites (linux distros, diferent tools for linux etc). now, the server part would be written in PHP using the SOAP standard to send data.
the thing is, i don't know how to send data if we assume that the clients could be written in C#, Java or any other possible language. i googled it a bit and i found only simple SOAP examlpes, where server sends int or string type, array is nowhere to find :S
i mean, i know the client part would call a method defined in WDSL, but- what if PHP would merge all URL links into PHP's Array() like this:
var $ArrayOfLinks = array(
0 => 'http://domainA.com/',
1 => 'http://domainB.com/',
2 => 'http://domainC.com/',
);
how could i then typecast from this type of array into C# readable type (ArrayList or similar)?
please help me out with this.. it's killing me.
|
|
|
|
|
If I'm correct you can send an array of strings using soap to your C# client,the C# client should interpret this as an array of strings. You can then convert it to an arraylist by using the AddRange method of the ArrayList.
WM.
What about weapons of mass-construction?
|
|
|
|
|
If i want to draw a piece of image inside another i use this:
g.DrawImage(img, rect1, rect2, unit);
but if i want to cut a portion of image from g as i'm using a rubber, how can i do?
I've tried with
Image img = new Bitmap(20, 20); // 20 is the dimension of the rubber
then
rect2.Width = rect2.Height = 20;
g.DrawImage(img, rect1, rect2, unit);
but it doesn't work.
WHY??
|
|
|
|
|
I want my add-in to know the breakpoint when user add it.
Dilly
|
|
|
|
|
So far, to my opinion, I can not do this in.net2003 and 2005.
|
|
|
|
|
i was working on images a couple of days ago and found that for pointers we use unsafe blocks....the question is that why do we say that unsafe code is faster than ordinary getpixel method code...
haseeb
|
|
|
|
|
You dont have all the runtime checks in unsafe blocks. Its a lot faster, but also a lot more dangerous to use.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I have a problem using a datagrid.
I have 2 forms. 1 with a data grid and one textbox (for test use)
and the second form has a couple of textboxes.
now i use a CustomRowEventArgs to select the row.
In form 1 this works..
I can even read The first collumn in the Textbox (for test use)
I also let him open the second form.
but there it does nothing.
If needed I can past the code or pieces of the code here.
I really need some help..
|
|
|
|
|
Sorry, but i didn't get what are u trying to do?
can u explain in detail and paste some code
Regards,
Pramod
|
|
|
|
|
The second form should be showing all the info that's clicked on the row of the datagrid on the first form
.
but in checkboxes.
my code:
it's looks kinna messy but i only post the important pieces here.
Form 1
<br />
public delegate void CustomRowHandler(object sender, CustomRowEventArgs e);<br />
<br />
public static event CustomRowHandler CustomRow;<br />
<br />
InitializeComponent();<br />
barryOracleDataAdapter1.Fill(barry11.Barry);<br />
CustomRow += new CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
{<br />
Barry1 DSet = e.DSet;<br />
DataGrid grid = e.Grid;<br />
int row = e.Row;<br />
<br />
<br />
textBox2.Text = e.DSet.Tables[0].Rows[e.Row]["lastname"].ToString();<br />
<br />
<br />
public void dataGrid_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)<br />
{<br />
<br />
int rowIndex = dataGrid.CurrentRowIndex;<br />
if (CustomRow != null)<br />
{<br />
<br />
<br />
<br />
CustomRow(this, new CustomRowEventArgs(barry11,dataGrid, rowIndex));<br />
DataForm1 frm = new DataForm1 (barry11,dataGrid, dataGrid.CurrentRowIndex);<br />
frm.Show();<br />
<br />
}<br />
}<br />
<br />
public class CustomRowEventArgs : EventArgs<br />
{<br />
<br />
Barry1 barry11;<br />
DataGrid grid;<br />
int row;<br />
<br />
public CustomRowEventArgs(Barry1 DSet,DataGrid Grid,int Row)<br />
{<br />
<br />
barry11 = DSet;<br />
grid = Grid;<br />
row = Row;<br />
<br />
}<br />
public Barry1 DSet<br />
{<br />
get { return barry11; }<br />
}<br />
public DataGrid Grid<br />
{<br />
get { return grid; }<br />
}<br />
public int Row<br />
{<br />
get { return row; }<br />
}<br />
}<br />
---------------------------------------------------------------------------
Form 2
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
InitializeComponent();<br />
Form1.CustomRow += new<br />
WindowsApplication30.CustomRowHandler(customHandler_CustomRow);<br />
<br />
<br />
private void customHandler_CustomRow(object sender, WindowsApplication30.CustomRowEventArgs e)<br />
{<br />
<br />
<br />
Barry1 DSet = e.DSet;<br />
DataGrid grid = e.Grid;<br />
int row = e.Row;<br />
<br />
editLASTNAME.Text = e.DSet.Tables[0].Rows[e.Row]["Firstname"].ToString();<br />
<br />
}<br />
|
|
|
|
|
just change the following statement
DataForm1 frm = new DataForm1 (barry11,dataGrid, dataGrid.CurrentRowIndex);
with
DataForm1 frm = new DataForm1 (barry11,dataGrid, rowIndex);
Hope that solves ur problem
Regards,
Pramod
|
|
|
|
|
Too bad.. I've tried that but the problem remains.
|
|
|
|
|
does anyone else have some solution or information?
|
|
|
|
|
I suggest you skip the event handling i the second form. I really can't see the purpose of it. But, perhaps I get it wrong.
Just assign the values to the textbox in the second form. You've got all the information you need through the constructor.
Like this:
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
InitializeComponent();<br />
PopulateTextBoxes(barry11, dataGrid, rowIndex);<br />
<br />
private void PopulateTextBoxes(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
editLASTNAME.Text = barry11.Tables[0].Rows[rowIndex]["Firstname"].ToString();<br />
}<br />
|
|
|
|
|
Dude you really are great
It works at once.
I would like to thank you 1000 time but hope you agree with one big Thanks.
Thank you so verry much you really are awesome.
|
|
|
|
|
You're welcome!
|
|
|
|
|
Oh just one thing:P
now I have this datagrid and a detail form.
now i adjust my button. i want a previos button on my second form..
code on form1:
this is on my mouse up event of my datagrid
-------------------------------------
<br />
DataForm1 tmpForm = new DataForm1 (barry11,dataGrid, rowIndex);<br />
tmpForm.Location = this.Location;<br />
tmpForm.Show();<br />
this.Hide();<br />
---------------------------------------------
DataForm1:
<br />
private System.Windows.Forms.Form _previousForm;<br />
and then comes this.. thinks this is a really bad way to do it:P
<br />
<br />
public DataForm1(Barry1 barry11, DataGrid dataGrid, int rowIndex)<br />
{<br />
<br />
InitializeComponent();<br />
PopulateTextBoxes(barry11, dataGrid, rowIndex);<br />
}<br />
<br />
public DataForm1(System.Windows.Forms.Form tmpForm)<br />
{<br />
InitializeComponent();<br />
_previousForm = tmpForm;<br />
<br />
}<br />
think this should be done other than this.. but i don't know how
last peace of code
<br />
private void btnbutton1_Click(object sender, System.EventArgs e)<br />
{<br />
_previousForm.Location = this.Location;<br />
_previousForm.Show();<br />
<br />
this.Close();<br />
}<br />
|
|
|
|
|
I really see no need to hide the first form. I would do like this instead...
<br />
DataForm1 tmpForm = new DataForm1 (barry11,dataGrid, rowIndex);<br />
tmpForm.ShowDialog();<br />
...and skip all the code to restore the first form in DataForm1.
|
|
|
|
|
but i really want to hide the first form:P
|
|
|
|