|
hi all
help me how to code in c# to
pass the texbox values present in form1
to form2 for a button click event
.
i had coded lik this ina button click of form1
private void btnEdit_Click(object sender, EventArgs e)
{
frm2.Show();-----i had created frm2 object above this click event
frm2.TextBox1=txtAreaName.Text;----> this code doesnt works. i mean here to pass the textbox value of form2 to textbox in form1.
}
pls help
thank you
senthil
|
|
|
|
|
There are many ways to acheive this, the easiest is to adjust the constructor for form2 to accept a textbox argument and store that as a variable in the form2 class in the constructor. Then you can access or change any of the form1.textbox properties from form2.
|
|
|
|
|
|
Hi,
I am working on the Ado.Net Entity Framework and I want to know the how it is best over the Ado.net considering the performance.
Thanks,
Sarang
|
|
|
|
|
Hi, I'm using the RequiredFieldValidator and ValidatorCalloutExtender in the UpdatePanel. The Validator is ok for the first time,but after that I face a problem when the control is blank, the error is : ControlToValidate is null.
Can somebody please help me.....
#ps: i m using AjaxToolKit...
Thanks....
|
|
|
|
|
Hi
I have a web browser object that loads a given page, and once its loaded i want to extract all the images from the DocumentStream and get them in an Image or Bitmap format.
Anyone know a way of doing this?
I have tried several methods but none seem to work.
I've noticed that right click > Save As seems to be instant, ie not redownloading the picture, which is my goal. Any idea what methods Save As uses to save it without redownloading?
Any help appreciated...
|
|
|
|
|
I am a bit confused about using the InvariantCulture flag while converting a string to double.
Can someone please guide me as to how do we take care that when we are converting a string to double it should work in different culture settings(like English which uses "." and french which uses "," for decimal separators). My idea is that if I give the InvariantCulture flag then Double.Parse or Convert.ToDouble can convert any string correctly.
Thanks,
Pankaj
|
|
|
|
|
Hi all, I've a problem with remoting: in order to connect to a remote object I have to open a port on the server. But then the server also asks for a connection with the client and the port used is random if in the client remoting file there is
<channel ref="tcp" port="0" exclusiveaddressuse="false">
or the specified port otherwise. My problem is that if I have to go behind a firewall I have to open the port, so I specify a port but then... when I try to start a second instance of my app I get an exception because the channel is already in use. I could ask the customer to specify a set (or range) of ports, but I wonder if there are better alternatives. For example, how do applications like P2P or web browser deal with multiple connection? I suppose that they have to accept incoming connections as well...
modified on Friday, December 07, 2007 3:25:47 AM
|
|
|
|
|
In my logging code, I want to display the name of the method that wrote to the log. How can my Log method get the name of the method that called it?
I'm thinking of something like the .TargetSite of an Exception (except I'd prefer not to throw an exception ... unless that's how to do this).
|
|
|
|
|
Let me make this more generic:
- how, in code, can I stop and get the stack trace up to that line of code? Hopefully I can do this without stopping and throwing an exception and reading the stack trace from the Exception object. I'm sure that's a performance hit...
|
|
|
|
|
By using System.Diagnostics.StackFrame like this:
public static void Main()
{
Func();
RL();
}
public static void Func()
{
//Get stack with line numbers
System.Diagnostics.StackTrace Stack = new System.Diagnostics.StackTrace(true);
foreach(System.Diagnostics.StackFrame Frame in Stack.GetFrames())
{
WL(Frame);
}
}
|
|
|
|
|
Thanks. That is exactly what I was looking for. Unfortunately, I never got email about your reply! So I went through the Help files and found this myself. I was just coming back to answer my own question when I saw your reply.
However, I'm curious how expensive *this* is, too...
|
|
|
|
|
hi
i want that where i click on dataGridView1, his value
will apire in textbox2
how to do that ?
|
|
|
|
|
http://www.codeproject.com/KB/cs/Drag_Drop_from_GridView.aspx
from the above mentioned article see how to detect which cell is pressed when u get the right cell than it will be easy for u to show it's value in textbox
|
|
|
|
|
Hi All,
I am working on a project using C# 2.0. I need the functionality in my project that at the runtime, when I resize the form by dragging its border using the mouse , all the controls within the form should resize as well. Please help.
Thank you.
A.Asif
|
|
|
|
|
|
u have to use Anchor and Dock property intelligently.
|
|
|
|
|
Putting all your controls in a table layout panel will make it easy.
Until you realize this message has nothing to say, its too late to stop reading
|
|
|
|
|
scenario:
when i click the datagridview's cell, immediately i need to pass this cell to a WHERE condition to select the remaining fields of the same row.(ie)the gridcell value is an ID value , remaining fields of the ID should be retrieved to textboxes.
I wrote code as
private void DataGrdVw1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (dsGridToTxtBx == obj._selectGridCellAreaDetails(DataGrdVw1.CurrentCell.Value.ToString()))
{
txtAreaName.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[1].ToString();
txtRegion.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[2].ToString();
txtLocORinterSt.Text = dsGridToTxtBx.Tables[0].Rows[0].ItemArray[3].ToString();
}
}
Pls help me. I cant trace the datagridview's click event. My above code has no effect in form.
ssk
|
|
|
|
|
Hi,
First of all check whether the Handler you have defined is handling the cell's content click. It will be called only when you click on the cell's content.
Its better to define a Handler for CellClick Event.
To access the current cell's value you can use following :
GridView1.CurrentRow.Cells("ID").Value
Regards,
Ujjaval Modi
|
|
|
|
|
Hi, I am new in vb.net 2003, I am using C# and i want to retrive the control in one form to another form. i am using like this.
public static frmDocumentMaster m_Childform;
public static frmDocumentMaster GetChildInstance()
{
if (m_Childform==null || m_Childform.IsDisposed) //if not created yet, Create an instance
m_Childform = new frmDocumentMaster();
return m_Childform; //just created or created earlier.Return it
}
But its shows only Label control not another control. Please anybody help me.....
f
|
|
|
|
|
- Please use something useful in your title: "Anybody help me???????" is not clear, use "retrieve control in another form" eg.
You can make your controls available in several ways. Personally I find using "static" a bad idea. better is to make your control public, even more better would be to create a public property that exposes the control, even more better than that is to create a public property exposing a property of that control (eg the Text property of a TextBox)
My advice would be to redesign your code.
Hope this helps.
|
|
|
|
|
Hi,
I am using datagrid in Winforms.
How can i set the autogenerate columns =false
I just want only those columns to show up whihc i have added no other columns apart from that.
Thanks.
Deepak Surana
|
|
|
|
|
Hi,
I think you don't have any such property "autogenerate columns" in datagrid for winforms.
Just select the fields you require to display in your database query.
Or else you can set the "Visible" property equal to 'False' for particular column in the datagrid which you dont want to display.
|
|
|
|
|
hello experts,
I have one question... Why ASPX pages are running more slower than any other web technology...?
I saw php sites are running too fast than the any ASP.NET application.
The latest example of it is Code Project it self. When it was in classic ASP than it run smoothly, but since the upgradation is apply on it using ASP.NET technology it running more slower and slower.
one more intersting aspect of ASP.NET is : This is the only web technology which having the compiled code and other technologies are run whole code every time. So .NET should run fast as compare to other...
How to over come with this particular problem...?
Regards
Pankaj Joshi
If you want to shape your dreams into reality, please wake-up...
|
|
|
|