I'm just starting my first project in ASP.NET MVC. In my webforms experience, I would usually have a separate project dedicated to my domain layer. In here, I would have my Domain specific objects along with my NHibernate mapping files and some business logic. Most of the examples I am seeing online are putting these classes along with b...
I've written a new application in a network I haven't worked in before, and am running into a problem.
If I have the following C# code:
FileStream fs = File.Create(@"\\MyServer\MyShare\testing.txt");
fs.Close();
In a console application, this code executes correctly.
In an ASP.Net application, I receive this error: Logon failure: un...
I have a simple extension method on the int type so I can do the following:
string timeLength = 61.ToTime() // timeLength will be "1:01"
This works great in code, but I want to use this extension method in a Repeater Template. When databinding I want to do the following:
<%# Eval("LengthInSeconds").ToTime() %>
That didn't work so I...
I have a web service (WCF or ASMX doesn't matter)... I have made a Console application, right-clicked, added service referrence. So far, so good.
However, I cannot for the life of me pass "security" credentials across to my service. This is my client code:
var client = new MyClient();
client.ClientCredentials.UserName.UserName = "bob"...
I'm overthinking this. I have colors stored in a database table, and I want to set the background of specific cells in a table to those colors. In other words:
<table>
<tr>
<td ???set color here???>
...content...
</td>
<td ???next color here???>
...next content...
</td>
</t...
My requirement is to develop a page with 4 sections, which cannot have a postback.
Section 1. Content which can be changed on user click
Section 2. List of users viewing the page online (Auto update when user leaves or visits the page )
Section 3. Chat for the users online
Section 4. Rating the content and other functionality for Sectio...
I have an app that is a combination of asp/asp.net, and both sides depend on the same cookies (they are in the same domain). There are some values in the cookies that I don't want going to the client anymore due to security concerns. What I was hoping to accomplish is to take out these values so they no longer go to the client, and the...
Hi,
I am having an application in which i am storing user ip address. But now i want to store the City, Country and Country Code of the user on the basis of their ip addresses. So I am able to get the user's IP Address in ASP.NET but how to get other details. If its possible (which i don't thin it is) then tell me else tell me some alte...
Can anyone explaine me, what is MVC, why we use it and how we can use it. Benefits of using this? and can we use ASP.NET MVC in ASP.NET 2.0 (VS 2005)
...
Ok, this is not a CSS issue, I removed all styling from the page. This is a calendar extender that has a target id of a textbox and the popupbutton is the same text box.
The month name is displaying lower than the
days, so it's not usable.
it's fine in IE.
I am using Safari in Windows Vista.
Does anyone know what is causing this...
I am adding dynamically controls to page by using LoadControl and Controls.Add. I need somehow to wrap Init and Load event handlers of this loaded controls into my code. So it should be such order of events SomeMyCode() -> Control.Init() -> AnotherMyCode() and the same for Load SomeMyCode() -> Control.Load() -> AnotherMyCode().
My idea w...
I am testing the UI of my ASP.Net Web Forms app using NUnit/Watin. I understand the high level concepts around TDD, Unit Testing, integration testing etc, but have not had much of a chance to put them to use until now.
So, when I am testing the validation logic on a data entry form, should I be writing one test that triggers each of ...
Path.Combine is handy, is there a similiar function in the framework for Urls?
I'm looking for syntax like this:
Url.Combine("Http://MyUrl.com/", "/Images/Image.jpg")
...Which would return: "Http://MyUrl.com/Images/Image.jpg"
...Of course string concatenation would be fine here since the '//' would be handled intelligently by the br...
I have the following code to zip all the files and then save it to the harddisk. I want zip all the files (this is done) and then attach the zip file to the Response stream so that the user have the option to save it!
protected void DownloadSelectedFiles_Click(object sender, EventArgs e)
{
string path = String.Empty...
Hi
I'm trying to retrive a dataset to a Gridview, but I just don't get any row in my Gridview. What am I doing wrong?
the page code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
CType(Master, AreaTrabalho).AlteraTitulo = "Projectos"
Using oSQL As New clsSQL(System.Configuration.Co...
I have a site that will ultimately support 4 languages and 2 countries (US & Canada, English and Spanish)
I'm wondering what's the best way to set up the directory structure?
Right now, I have a root site called site.com:
This will take you to a page where you choose your country and language.
Ideally, I want to have the directory l...
I'm trying to follow a simple example of AJAX-enabled WCF Service like:
http://www.pluralsight.com/community/blogs/fritz/archive/2008/01/31/50121.aspx
I'm getting the JavaScript errors Type not defined and Sys not defined.
Does this mean there is an issue with one of these .axd things? or something else?
How do I troubleshoot what is wr...
Hi All,
I have very simple html report generated from one of my objects on server. I generate html code at PageLoad because I need to clear that object from session and don't want ask external web service for data after user clicks on linkbutton.
Roughly idea is that user clicks on button on page and the report will be displayed ...
Hi All,
Could anyone please help me with this. On the production site app_offline.htm works only till you start uploading dlls. As soon as you start uploading dlls it throws following error"Could not load file or assembly 'SubSonic' or one of its dependencies.
The process cannot access the file because it is being used by another proces...
How do I load a dropdown list in asp.net and c#?
...