Hi
I am trying to do the following
I am building asp.net website with c# language
I want to read a text file from my project(the file is inside the project)
I tried to get the file Path by this way :
string path=Request.PhysicalApplicationPath+"filename.txt";
but I can't use The "Request" object from separated C# file ??
note: separated C3 file,I mean it's not related with aspx file
can you help me with my way or do you have another way ??
thx
how can i check if a user is logged in in user control with asp.net mvc
usually on a view page i use this
<% if (User.Identity.IsAuthenticated) {%>
//Do something
<% } %>
but i can't get this done on a user control
I have the following asp.net mvc 3 razor code, where "item" is my model,
<a @if (item.Selected) { class="youarehere" } href="@item.Href" title="@item.Title">@item.Description</a>
This code throws up the following error,
CS1513: } expected
which is pointing to
class="youarehere"
portion of the code, but I could not figure out why. Could someone help point out how to fix it please? Thank you.
Here's my ASP Classic:
set irs = recordset(sql,PageDB)
if not irs.eof then
dim new_list
new_list = ""
do while not irs.eof
'Add irs("name") to new_list and seperate by comma
irs.movenext
loop
end if
kill(irs)
How would I add irs(name) to new_list and seperate by a comma?
Hi i am trying to build a website usign ASP.NET what is the best resource or way to learn it?
Also do i need DotNetNuke or something similar to manage my project?
Thanks in advance.
I know the .NET framework and WPF pretty well, but I think the whole thing has gotten too blown up, especially for small apps as the whole .NET framework 3.5 weighs 197 MB by now.
I am looking for a language/framework/library that provides functionality similar to that of WPF (animations, gradients, a.s.o.) and the .NET framework (of course not everything, but the basic features) and which is faster and more lightweight than the .NET framework and creates smaller and faster applications than the ones using .NET.
Do you have any suggestions?
Hi,
I've seening quite a few posts on here regarding grids, but nothing specifically asking for a free grid component that supports editing.
Has any body come across such a thing? Is there a JQuery pluggin that I could use?
If not has anybody got any pointers on a good approach to writing my own (using asp.net mvc2 and/or jquery)?
Thanks in advance!
I have an old redhat 8 box that I need to pragmatically send files to my webserver from. Disregarding the security issues with this, I've come up with the following way.
curl -F file=@<filename> http://webhost/reciever.aspx
The problem is, no matter what I try, the ASP.NET page is not accepting the file. What am I doing wrong?
Hello,
I have two comma separated lists:-
36,189,47,183,65,50
65,50,189,47
The question is how to compare the two in classic ASP in order to identify and return any values that exist in list 1 but that don't exist in list 2 bearing in mind that associative arrays aren't available.
E.g., in the above example I would need the return value to be 36,183
Thanks
I would like to know the number of users logged into my ASP.NET 2.0 application.
Points to be considered:
1) Simplest way would be to use Application or Cache object to have the counts on Session start or end. However this would fail if there is a worker process recycle. Wouldn't it?
2) Should't make a difference whether the session is inproc/state server managed/ or SQL server managed.
3) Should preferably be seamless to a web-farm architecture.
Is there any IOC container that already implements a controller factory compatible with asp.net mvc 2.0 ....if so i'll move my projects to 2.0 to test...
Anyone know a good reference about it?
We have an ASP.NET application that uses SQL statements, where table names are unqualified. When compiled, it works fine, but when uncompiled, it complains and errors out, saying these tables dont' exist.
(Qualified name looks like Select * from MyDatabase.mySchema.MyTable ;
Unqualified like Select * from MyTable)
If you try these queries on the database, by yourself, it will take only the qualified names.
What's going on? I thought Compiled vs Uncompiled apps should perform the same way codewise.
In my 2nd ASP.NET MVC project I'm facing a very weird problem: when I call the SubmitChanges method of the DataContext class, nothing updates in the database. It's weird because everything works fine with my first project.
I'm using a remote database created in Sql Server Management Studio, I tried doing some queries there and in Visual Studio 2010 (where I have the connection to the database), they all work.
Where might the problem be hidden?
Hi at all.
I've the following problem: asp.net TextBox server side control, fire onTextChanged only when it loose focus.
I would like to fire my server side event each time user press a key.
How can i do ?
Thanks
i have rename the table name of asp.net administration tool's website now its not working when i click on security it gives an error(invalid server name or credentials, or by insufficient permissions) so please let me know if any one have solution.
I just ran Google's Page Speed application against our site and one of the recommendations was to Leverage browser caching. Expanding this revealed the following:
The following cacheable resources have
a short freshness lifetime:
Specify an expiration at least one week in
the future for the following resources:
<a long list of images >
<some javascript files >
How do I go about lengthening the "freshness lifetime" of particular images?
It's an ASP.NET project running on IIS7.5
Thanks for any help!
I have a database online that I would like to be able to load into an NSArray in my app. I can use arrayWithContentsOfURL with a static file, but I really need to go to a url that generates a plist file from the database and loading it into the array. I can use ASP or PHP. I tried setting the response type to "text/xml", but that doesn't help.
Any thoughts?
I was wondering if anyone has come up with an ASP.net server tag for the HTML5 canvas? I was thinking of something where I could declaritively define paths, curves; etc in the aspx markup, and the control would deliver the js to do this (perhaps with support for browser detection, and delivery of an emulation script for IE browsers.)
Maybe a good idea for a Codeplex project for me to start up?
I want to create asp.net 4.0 dynamic pages loaded from my MS SQL server. Basically, its a list of locations with informations. For example:
Location1 would have the page www.site.com/location/location1.aspx
Location44 would have the page www.site.com/location/location44.aspx
I dont even know where to start with this, url writting maybe?
hey all,
i was wondering if any one can advise me on how i can go about implementing a email and account validation feature in my ASP.net website. so when a user creates an account, an email is sent to the email address used, and the user needs to verify that email address to be able to logon.
thanks
Sounds dummy but I can't set to a server-side control's property a value contains quote marks ":
<asp:CompareValidator ErrorMessage="Curreny-from can't be equal to currency-to" runat="server" />
I need to quote "from" and "to".
I tried escaping \"from\" and double quote marks ""from"" - both doesn't work. How to do that?
how to call a oracle database storedprocedure from asp.net mvc using nhibernate and how to use sys_refcursor to display a data in view pages give me sample application . thanks
I've been reading about MVC in which the authors suggest that testability is one of the major strengths of MVC. They go to compare it with ASP.NET WebForms and how difficult it is to test the code behind in WebForms.
I do understand it's difficult but can someone explain how unit tests were written to test code behind logic in the old days?