|
i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp
string filepath= fileUpload1.PostedFile.FileName;
but
filepath only holds the file name.. no path...............
helpp plzzzzzzzzzz
|
|
|
|
|
I think, this is the wrong forum. Use ASP.NET forum.
|
|
|
|
|
Hi,
The code below looks for a particular service i.e "Index service" and then checks for the status i.e. stopped, start...
How do I modify this code so that I can check for the startupType of the service i.e. disabled, automatic, manual?
Thanks
ServiceController[] installedServices;
installedServices = ServiceController.GetServices(strServer);
foreach (ServiceController tmpService in installedServices)
{
//proceed only if the service is installed...
if (myService.DisplayName.ToLower().Trim() == "Installed Service")
{
//get the status of the service...
strServiceStatus = myService.Status.ToString();
ServiceInstaller serviceInstaller = new ServiceInstaller();
serviceInstaller.ServiceName = strService.ToLower().Trim();
strStartupType = serviceInstaller.StartType.ToString();
}
}
|
|
|
|
|
|
|
Hi,
I am trying to load the large values from the stringbuilder object to the textbox. The code below;
static StringBuilder strCommandBuild = new StringBuilder ();
// Business Logics here
public string Commands
{
get
{
return strCommandBuild.ToString (); //txtRunCfg.Text ;
}
set
{
strCommands = value;
}
}
// UI Part... where i am calling the strCommandBuild...
txtRunCfg.Text = txtRunCfg.Text + objScript.Commands;
The strCommandBuild has more than 2048K bits of datas(ie > 2048 * 1000). When it's loading in to textbox it hangs the application completely. How to solve this problem? Any help appreciated... Thanks..
How to load the values to textbox shown above.
Reg,
Subbu
|
|
|
|
|
It doesn't make any sense. What do you want with a 2MB of character in a textbox ?
|
|
|
|
|
Yes I want to load maximum size of 40 MB in a textbox.
TextBox: Max length = 50,000,000
I am getting the values as string datatype and assigning to textbox...
|
|
|
|
|
Hi,
When I am executing the code it's throwing the error as;
"Exception of type System.OutOfMemoryException was thrown"
Reg,
Subbu
|
|
|
|
|
Yes, that's an error of too much charachters...
|
|
|
|
|
|
Thanks a lot...
I have used Richtextbox. Its working fine. But when I closed the application then it throws the same error as
"Exception of type System.OutOfMemoryException was thrown".
What need to rectify this error?
Thanks,
Subbu
|
|
|
|
|
What are you doing during closing application ?
I just tried 2048000 charachters in richtextbox and close the application, it's ok, no exception.
|
|
|
|
|
I have a SQL 2005 server using the following parameters
DBName=MyDatabase
user: joe123
passwrod:sm123
joe123 is teh MyDatabase owner
I want to connect to the DB, find out the status and display it in textBox6.
The problem is that the "try" block is not executed. Error with access deny.
If I run c:\oslp -Ujoe123 -Psm123 -Slocalhost\SQLSRV--it works
conStr ="user id=joe123;password=sm123;server=localhost\\SQLSRV;Trusted_Connection=yes;database=MyDatabase; connection timeout=30";
SqlConnection conn= new SqlConnection(conStr);
try
{
conn.Open();
SqlCommand thisCommand = conn.CreateCommand();
thisCommand.CommandText = "SELECT DATABASEPROPERTYEX(‘ctxima’, ‘Status’) DatabaseStatus_DATABASEPROPERTYEX";
Object dbStatus = thisCommand.ExecuteScalar();
}
catch (System.Exception excep)
{
MessageBox.Show(excep.Message);
textBox6.Text=dbStatus
}
ANY HELP IS GREATLY APPRECIATED
|
|
|
|
|
Try to use an SqlDataSource from your toolbox, configure, custom a random select statement. SqlDataSource will automatically generate a connection string.
use it as this example:
MyConnection1.ConnectionString = SqlDataSource1.ConnectionString ;
full example:
SqlConnection con1 = new SqlConnection();
SqlCommand com1 = new SqlCommand();
con1.ConnectionString = SqlDataSource1.ConnectionString; <<<<
con1.Open();
com1.Connection=con1;
com1.CommandText="SELECT [Name] FROM Table1 WHERE [Id] = '"+TextBox1.Text.Trim()+"'";
com1.ExecuteNonQuery();
com1.Dispose();
con1.Close();
|
|
|
|
|
I have developed a product which i want to distribute.
I want users of the product to register before using the product. What are steps required to provide licensing? Pls help
|
|
|
|
|
1 - write code
2 - test
There's all sorts of licensing schemes. People invent their own, that's why crackers don't know how to break them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Christian Graus wrote: There's all sorts of licensing schemes. People invent their own, that's why crackers don't know how to break them for an hour or two.
FTFY
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
You might want search on the net related to licensing mechanism
some of the important things you might want do are
- Selecting hardware PC id for unique identification of the machine e.g hdd serial number,dongle, or even some network card ID [depends on your need]
- you should maintain a increpted license file with the product
- you should store your pc id in this file and other any related info, which you should use to validate the license of the product
rest you should think on your self!!
|
|
|
|
|
I just want to ask how will i be able to include the other relational operators like >= and <= in a regex pattern?
as of now this is my pattern:
(for\s*[\(]\s*int\s*[a-zA-Z\d]*\s*=\s*[\d]*\s*;\s*[a-zA-Z\d]*\s*[\<\>|\>=\<=])
Also, how will i create a pattern for unary operators? Whenever i create one using a regex tester, the tester does not capture the unary operator.
modified on Wednesday, August 5, 2009 2:43 AM
|
|
|
|
|
Are you trying to search for for loop in the file? If that is the case, then just search for text between for( and ).
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
No. that pattern is used to check the entered statement if it is a correct syntax of a for loop statement or not.
|
|
|
|
|
for(int i=0; i<(a+b)/2; i++)
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
|
Mohammad Dayyan wrote: How can we change the background screen color in Console ?
Here it is,
using System;
public class Test{
static void Main(string[] args){
Console.Title = "My Console Application";
Console.ForegroundColor = ConsoleColor.Blue;
Console.BackgroundColor = ConsoleColor.Yellow;
Console.WriteLine("Press Any Key To Continue.......");
Console.ReadLine();
}
}
Hope This will help you
|
|
|
|