|
I meant exactly what Damian said. This will allow you to identify how long a user is inactive and reset the flag if he is inactive for long time.
Best wishes,
Navaneeth
|
|
|
|
|
I have a file upload control in my application. The user can upload a file starting with alphabets as well as numerals. However, while uploading a file with numbers ,it is giving error. I have the following validation expression:
ValidationExpression="[a-zA-Z\\].*(.txt|.csv|.CSV)$"
How can I include the validation for numbers also? I tried 0-9 as below , but it didn' worked.
[a-zA-Z0-9\\]
Please help
Success is the good fortune that comes from aspiration, desperation, perspiration and inspiration.
|
|
|
|
|
Why limit filenames at all ?
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.
|
|
|
|
|
IMO, you only have to test for supported extensions. Work with Path.GetExtension[^] method. You don't need to any regular expression.
Best wishes,
Navaneeth
|
|
|
|
|
Hi
I don't know how I can use a static class, that is placed in another folder from where I'm calling it.
I have the code below in default.aspx.cs, witch is placed under the folders Test1/Test2
(\WebSite12\Test1\Test2\Default.aspx.cs)
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SqlConnection s = Databas.con;
}
}
The class, Databas.cs is placed in the root of the website. I get the error The name 'Databas' does not exist in the current context. I have the same problem with the global.asax, whitch is also placed in the root.
Please Help
Fia
|
|
|
|
|
The root is the wrong place to put it, in every way. There's a folder for your application code, it has to go in there.
Why would you want to return a SQLConnection into the presentation layer ?
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.
|
|
|
|
|
Hi
What I'm trying to say it that it doesn't find it, so I can't use it in the code behind.
Fia
|
|
|
|
|
Hi, thanks for your answer
I put the Databas.cs in the folder App_Code, but I couldn't use it anyway. Is there something else I have to do, then writing SqlConnection s= Databas.con.
I have it like this because I don't want to write the connection string for every page.
I have trouble with using the global.asax also, should that file also be placed in App_Code. But as I said I can't use it anyway.
Please Help
Fia
|
|
|
|
|
Hi
Sorry, I placed the Databas.cs file in the App_Data folder, but now I have it in the App_Code folder and it's working, thanks. But what about global.asax. That file is placed in the root of the website, but I can't use it anyway.
Fia
|
|
|
|
|
What do you mean you can't use it ? What do you think it's for ?
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.
|
|
|
|
|
Hi,
i have a windows services that uses a service reference to amazon web service. I have created a dll that actually has the service reference and the dll is called by my windows service. My windows service works fine. I also have a local asp.net application that uses the same dll and works great (Probably because dll and asp.net application are created on same machine). Recently, i moved the asp.net application to LAN Server. I copied the dll into bin folder. I also copied the service reference folder to bin folder and it turns out that the asp.net application is not using the service reference. It is calling my dll but the dll inturn isn't using the service reference.
Can anybody please provide help on where should i copy the service reference folder or files. or wat approach i should take to solve this issue. I googled but it seems that i am not googling appropriate keywords. Any help, link etc will be highly appreciated
Thanks
Mark
|
|
|
|
|
Well, whenever you add reference to a web service, Visual Studio will add one settings file and create the entry to it which points to the web service location.
It may also create one entry to Web.config.
Have a look if you have this configured properly for your compiled assembly.
|
|
|
|
|
Hmmm... , on my local machine i added the reference to dll (ie my dll) thru website->add reference, whereas on the server, i just placed my dll in bin folder because i thought that should be enuf. On my local machine, i didn't make any change to add service reference so i believe web.config should have not changed... Am not sure about settings file though... It seems that by adding reference thru website->add reference, asp.net on my local machine knows where to find the service reference files but when added to only bin, asp.net doesnot know whre to get service reference from ... Is there anyother way of adding reference on server? I have tried placing the files everywhere on server but it isn't working... I need to see the web.config file ...
Thanks for replying
|
|
|
|
|
Well, Visual studio always does some tricky things which are hidden from normal users.
Say if you are adding a web reference in class library, it will produce one App.config file and place the config entries there. If you reference the dll from your website, the final build will merge the entries of all the class libraries referenced to its web.config. Thus you will find the Web reference working perfectly.
This is just to allow everything configurable. Such that, if you change your server, changing just the config path will do.
On your machine, if you do reference the assembly through Visual Studio, it will automatically change configuration and make alteration so that your project works. If you want this by Copying the bin folder, you need to manually change the config file yourself to make it work.
|
|
|
|
|
Hi ,thanks..
It seems that i need to look into all config files... I will let you know if i am not able to solve the problem...
Thanks
Mark
|
|
|
|
|
mark_me wrote: I will let you know if i am not able to solve the problem...
Sure budd..
|
|
|
|
|
Good Morning,
I am trying to pass the information from GridView cells to another asp.net page using VS2008 (C#). This is done by using a Select link in each row to pass the information from that row. I am using the following code:
<asp:HyperLinkField DataNavigateUrlFields="CallCreated, Call_Id, Sponsor, ConcurrentStudies, StudyId, NCTID,
Country, TimeZone, Contact, Title, Phone, Email, SubOn, SubBy"
DataNavigateUrlFormatString="CreateCall.aspx?CallCreated={0}&Call_Id={1}&Sponsor={2}&ConcurrentStudies={3}&StudyId={4}&NCTID={5}
&Country={6}&TimeZone={7}&Contact={8}&Title={9}&Phone={10}&Email={11}&SubOn={12}&SubBy={13}" Text="Select" />
Actually, it works perfectly until I try to add one particular column from the grid called CtWebPage. When this is added, the "Select" link which forwards the information to the receiving page becomes inactive. That is to say, the information is viewable in the grid, as received from the Sql query, but the link becomes inoperable. As long as I do not use this one column, it works fine. I have tried renaming the column and changing its data type from (varchar) to (nvarchar) just in case, but it does not make any difference. The information passed from this column is a string representation of a web page address (in case that makes a difference). I have tried renaming the problem column and it makes no difference.....it still does not work!. I have tried adding a new column, called Test, and put a single word in it for data, and it works fine. I had this happen once last year and I gave up and left the column out, thinking it was a fluke. Obviously, it was not. This time, I am determined to resolve it...with YOUR help, if you please.
Thank You, Pat
|
|
|
|
|
At my new work i have to design & implement a online purchae order system for internel staff .
steps are
1. user can order any product - purchase order number should be generated automatically
2. if the user not authorised to approve the order user should send the notification to relevnt department for approval by email.
3 once it has been approved vendor should receive the order. also copy should go to finance
my employer is using dotnetnuke .. could you please provide me a SAMPLE APPLICATION OR THE WAY how i should be implemented ?
Many thanks
|
|
|
|
|
|
Hi Guys,
Anybody knows the way to format the String to get currency in the following format.
-$12,458.40 when the input is -12458.40.
i tried the following
String.Format("{0:c}",-12458.40);
but the result is (-$12,458.40)
|
|
|
|
|
rajmahen wrote: but the result is (-$12,458.40)
But this is the same thing that you wanted.
Actually if you format using {0:c} it will format according to what defined in your local settings.
|
|
|
|
|
Okay....then where i can change dat local setting in my browser or can i change it thro code itself??...
if it is possible in code
can you give me d snippet??
i hav seen this format change settings in MS Excel...is dat possible in ASP.net also?
modified on Monday, November 2, 2009 10:23 AM
|
|
|
|
|
Hi,
I Have a Problem,
I Want To Unzip My File Using C# Code On Server ...
Is There Any Solution......
|
|
|
|
|
|
Use WindowsBase .
Remember, it needs ContentType Xml to be inside the zip file to work correctly.
Otherwise you might go for depreciated VJslib.dll also
|
|
|
|