User Profile
Collapse
-
Better to use LINq query to access controls collection -
Try this :
double salary = 1243.56;
string formatted_Salar y=String.Format ("{0:#,##0.00;( #,##0.00);Nothi ng}", salary);Leave a comment:
-
Code:System.Data.SqlClient.SQLConnection con=new System.Data.SqlClient.SQLConnection("server=local;database=EmpDB;user id=sa;password=sa"); System.Data.SqlClient.SQLCommand cmd=new System.Data.SqlClient.SQLCommand(); cmd.Connection=con; cmd.CommandText="Delete from TableName"; con.Open(); cmd.ExecuteNonQuery(); con.Close();
Leave a comment:
-
balame2004 replied to Could not find file 'Microsoft.Windows.CommonLanguageRuntime, Version=2.0.50727.0in C SharpChange CopyToLocal property of the reference in your project to be true and check it out.Leave a comment:
-
Cool! try this.
Response.Write( "<script language='javas cript'>alert('M essageBox')</script>");Leave a comment:
-
try this:
Code:foreach(Control cnt in this.Controls) { if(typeof(cnt).ToString().ToLower().Contails("checkbox) ) { if(((CheckBox)cnt).Text.ToString().Equals("2")) { ((CheckBox)cnt).Checked=true; break; } } }
Leave a comment:
-
I think use shoud use string strPitch = "0.050""; . Does not it work?Leave a comment:
-
You Write code into a new file and save it as .aspx file by using IO.File objects.Leave a comment:
-
Code you have given works perfectly. Could you please give me code to define DDLFields so I can able to reproduce the issue.Leave a comment:
-
Or you can declare the variable as static. Now the value of the variable won't change during page round trips.
Code:static int count = 0; protected void Button1_Click(object sender, EventArgs e) { //if the variable had been declared here it would have a scope //for the Button1 Click function only. count++; int noofcount=count; }
Last edited by Frinavale; May 26 '09, 01:19 PM. Reason: Added code tags. Please post code in [code][/code] tags.Leave a comment:
-
Request object had enough information about the request to your page.
Try this:
protected void Page_Load(objec t sender, EventArgs e)
{
Response.Write( this.Request.Ur l.AbsoluteUri);
}Leave a comment:
-
Yes it is possible. You just call the method from the dll as usual.Leave a comment:
-
Better to declare count variable to be static inside the event method..
Code:protected void Button1_Click(object sender, EventArgs e) { static int count=0; count++; int noofcount=count; }
Last edited by Frinavale; May 25 '09, 01:35 PM. Reason: Added code tags. Please post code in [code] [/code] tags.Leave a comment:
-
You need to know how to connect remote datatabase in crystal report. Read online tutorials.Leave a comment:
-
You are creating new instance for the parent form and trying to enable the menustrip of the form instance.Defini tely it won't work as you need to make the changes in the actual instance of the parent form. Pass the actual instance of the parent form to login form and make the changes in it.
Eg:
Add the following constructor to your login form.
private MDIparent parent=null;
public LoginForm(MDIpa rent...Leave a comment:
-
Your source code is wrong If your user control contains a textbox to enter email id.
The best way to retrieve value of text property of a textbox added in an user control is as follows.
this.TextBox1.T ext=UserControl 1.TextBox1.Text ;Leave a comment:
-
This is interesting question. Very useful if someone explain the possibilities.Leave a comment:
-
Hey, Try this.
Select Top 5 from Table where Field In(select Top 10 Field from Table order by Field) order by Field DescLeave a comment:
-
I don't think it is easy to do with siongle query. Better to think about a stored procedure to do it.Leave a comment:
-
There is a way to typecase your MDI form that you have passed as object.
You just mention the object with the type of Form. So intellisense will show the members of the MDI form object.
Eg:
C#:
string formName=((Form )mdiFormObj).Na me;Leave a comment:
No activity results to display
Show More
Leave a comment: