16,019,349 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by TheAteist (Top 37 by date)
TheAteist
26-Apr-11 5:01am
View
Why? Can you suggest something else?
TheAteist
15-Mar-11 18:48pm
View
but m1 & m2 retrieved from different tables. You want to say that even m1 & m2 retrieved from DIFFERENT tables, if they have 2 DIFFERENT objects BUT with the same PRIMARY KEY this is considered as identical objects??
TheAteist
11-Mar-11 8:55am
View
Thank you for your answer, but I need this using StructureMap.dll
TheAteist
1-Feb-11 3:28am
View
I updated the html that is inside UserControl
I read the post in the link you provided, BUT I still don't understand why the script isn't loaded?
The content of UserControl is inserted in some div(DOM element), so why the script still isn't downloaded?
TheAteist
24-Jan-11 15:53pm
View
Can you advise me please a GOOD open source or other alternative?
TheAteist
24-Jan-11 13:01pm
View
So, is there are any way to use this DLLs or I have to check some OpenSource for this?
TheAteist
24-Jan-11 10:27am
View
How do you see that this is available in .NET Framework 4.0? It's written that it is in Visual Studio 2010
Thank you
TheAteist
19-Jan-11 17:05pm
View
It really works. Thanks.
BUT, now I cannot call ProcessRequest on UserControl in order to pass Context to it and initiate.
Is there any way to do it?
TheAteist
19-Jan-11 6:50am
View
Did you read what I wrote? I wrote that I don't want to add Page and do it in the Page. And in the link you've provided they render control inside PAGE. I want be able,for instance, to render UserControl inside GenericHandler. My problem is when UserControl contains asp controls that have runat="server" this cause errors
TheAteist
16-Jan-11 2:54am
View
Thank you for your explanation, BUT the rules are added automatically by calling to Html.EnableClientValidation(), (I use DataAnnotation)
TheAteist
16-Jan-11 1:47am
View
For example: I build module "ContactUs". I add to it some TEXTBOXes and button and want to save the form in DB in that way that when the module is loaded it will "constructed" from DB. And also I need table that will save all data entered in this module. Of course, the tables that save the structure of the module and the data should be generic for all other modules.
TheAteist
22-Dec-10 13:44pm
View
What do you mean by "you should follow the MVC model"? Using MyBinder violates MVC model?
TheAteist
8-Dec-10 12:49pm
View
I understood what you wrote and I decided to use resxs files.
In resxs files I should hold localized data such as labels, buttons names, errors validation text and other small text. BUT, where I should hold the following data:
1 - localized articles. If I'll hold them in resxs files, wouldn't it "inflate" memory since the resx file, which is dll that loaded to the server memory, will be very "heavy"?
2 - small localized text like introduction/welcom text? The doubt is from the same consideration from (1).
TheAteist
28-Nov-10 14:22pm
View
I mean, that if there are N records in the table, so I need to get the record number N-1
TheAteist
23-Nov-10 16:07pm
View
No, you didn't understood me. Here the code, but you can't know that method Update will take UserDetails. But you DO know, that some pair-values in FormCollection matches some Properites in UserDetails
[HandleError]
public class HomeController : Controller
{
[HttpPost]
public void Test(FormCollection form)
{
var type = Type.GetType("MvcApplication2.Controllers.User,MvcApplication2").GetMethod("Update");
type.Invoke(this, new object[] { form });
}
}
[DataContract]
public class UserDetails
{
[DataMember(Name="name")]
public string Name { get; set; }
}
public class User
{
public static void Update(UserDetails user)
{
}
}
TheAteist
8-Nov-10 2:36am
View
I create the page programmaticall. Here is the whole code
Private Function buildTitleControl() As HtmlTitle
Return New HtmlTitle()
End Function
Private Function buildLinkControl() As HtmlLink
Dim link As HtmlLink = New HtmlLink()
link.Href = "inc/newsletter.css"
link.Attributes.Add("rel", "stylesheet")
link.Attributes.Add("type", "text/css")
Return link
End Function
Private Function buildHeadControl() As HtmlHead
Dim head As HtmlHead = New HtmlHead("head")
Dim title As HtmlTitle = buildTitleControl()
head.Controls.Add(title)
Dim link As HtmlLink = buildLinkControl()
head.Controls.Add(link)
Return head
End Function
Private Function buildFormControl(ByVal page As Page) As Control
Dim ascx As Control = page.LoadControl("NewsLetter.ascx")
Return ascx
End Function
Private Function buildHtml() As String
Dim page As Page = New Page
page.Controls.Add(New LiteralControl("\r\n<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">\r\n\r\n<html xmlns=""http://www.w3.org/1999/xhtml"">\r\n"))
Dim head As HtmlHead = buildHeadControl()
page.Controls.Add(head)
page.Controls.Add(New LiteralControl("\r\n<body>\r\n<div>\r\n"))
Dim form As Control = buildFormControl(page)
page.Controls.Add(form)
page.Controls.Add(New LiteralControl("\r\n</div>\r\n</body>\r\n</html>\r\n"))
page.ProcessRequest(HttpContext.Current)
Dim sb As StringBuilder = New StringBuilder()
Dim sw As StringWriter = New StringWriter(sb)
Dim htw As HtmlTextWriter = New HtmlTextWriter(sw)
page.RenderControl(htw)
Return sb.ToString()
}
TheAteist
7-Nov-10 7:24am
View
What "runat='server'"?
This code was taken from .vb that was generated from aspx page.
I get this error only when I add title to head
why?
TheAteist
7-Nov-10 5:35am
View
I improved the code.
Before the execution of "head.Controls.Add(title)":
1 - When I watch "head" it shows - "{InnerText = ""}"
2 - When I wathc "title" it shows - "{System.Web.UI.HtmlControls.HtmlTitle}"
After the exectuion of head.Controls.Add(title)":
When I watch "head" it shows "{InnerText = (InnerText) threw an exception of type System.Web.HttpException.}"
Why? How to fix it?
TheAteist
25-Oct-10 6:23am
View
Now I get the whole picture
Thank you very much:)
TheAteist
25-Oct-10 5:21am
View
So if I have site A & B within the same Application Pool, so there are ALWAYS will be 2 AppDomains: 1 for site A and other for site B, right?
TheAteist
25-Oct-10 4:11am
View
Thank for your help. Can answer another question please?
Single AppPool has ONE AppDomain that has multiply HttpApplication.
Is there any reason that AppPool will create more than ONE AppDomain?
TheAteist
25-Oct-10 3:44am
View
I thought you meant that single HTTPApplication object can handle multiply requests at a single point of time(asynchronously). But now I think I get it.
HTTPApplication object can handle only ONE request at a single point of time and when it(HTTPApplication object) finished, so the SAME HTTPApplication object can handle another request, right?
TheAteist
24-Oct-10 7:41am
View
"... it may need multiple objects..." - does "it" refer to "HttpApplication"? If it does, so what "multiple objects" do you talking about?
TheAteist
21-Oct-10 13:57pm
View
Regarding the answer to 1st scenario:
I saw with reflector that HttpApplication is created by HttpApplicationFactory and there is the checking if HttpApplication instances doesn't exceed the maxNumber of HttpApplication instances. So, if 1 HttpApplication can handle all requests, so why there are limitation to HttpApplication instances if only 1 HttpApplication is needed to handle requests?
Thank you
TheAteist
7-Oct-10 9:44am
View
I downloaded "DocumentFormat.OpenXml" library, but I still get this message
Here is the code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using DocumentFormat.OpenXml.Spreadsheet;
namespace WebApplication2
{
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Workbook book = new Workbook();
Worksheet sheet = new Worksheet();
Cell cell = new Cell();
cell.CellValue = new CellValue("test");
Row row = new Row();
row.Append(cell);
sheet.Append(row);
book.Append(sheet);
Response.Clear();
Response.AddHeader("content-disposition", "attachment; filename=test.xls");
Response.ContentType = "application/vnd.ms-excel";
book.Save(Response.OutputStream);
}
}
}
TheAteist
6-Oct-10 17:13pm
View
Have I understood it correctly: this "bug" is only in 2007 version and will be fixed in future"?
TheAteist
6-Oct-10 16:54pm
View
MS-Excel. Every version of Excel(2003-2010)
TheAteist
6-Oct-10 15:59pm
View
but I don't use Office automation(Microsoft.Office.Interop.Excel). I use Open XML SDK 2.0. Is this them same? Because I read that this format(Open XML) support all ms-excel versions
TheAteist
5-Oct-10 5:35am
View
1 - Why this way is better that using objects of Microsoft.Office.Interop.Excel
2 - Building string separated with comma won't be too "HEAVY" if I have 2000 records?
TheAteist
5-Oct-10 5:14am
View
Info of customers(FirsName, LastName, Email, Adress, PhoneNumber...)
TheAteist
5-Oct-10 3:35am
View
It didn't fixed the problem. ONLY if I change "double" to "solid" the problem is gone
TheAteist
4-Oct-10 7:45am
View
I finally found the mistake. In code, that I was given to fix bugs, I didn't notice the piece of code(in VB) in master page:
"If InStr(Request.ServerVariables("SERVER_NAME"), "www") < 1 And InStr(Request.ServerVariables("SERVER_NAME"), "adz") < 1 Then
Response.Status = "301 Moved Permanently"
Response.AddHeader("location", "http://www." & Request.ServerVariables("SERVER_NAME"))
End If
"
I placed this code in "#If Not Debug Then .... #End If" block, so this code won't executed in debug mode.
TheAteist
30-Sep-10 12:33pm
View
Thank you for the help. I'll let you know when I'll try it on sunday-monday
TheAteist
30-Sep-10 8:47am
View
Ok, I'll disactive link scanner and check if it helps.
But I still don't understand why #Quote#link scanner#Quote# could be the problem. It scans and blocks viruses. Why it will block sites that run in ASP.NET Development Server??
Thanks
TheAteist
30-Sep-10 7:02am
View
I don't run application in IIS. The application runs in ASP.NET Development Server. It redirects from #Quote#http://localhost:PORT/Page.aspx#Quote# to #Quote#localhost.com#Quote#
Please help me
TheAteist
29-Sep-10 10:52am
View
I converted WebSite project to WebApplication. Now, in my pc all works fine, but in my work's pc it works that way: when I first run the application, in debug mode, and an error is occurred(like database connection) it redirects to localhost.com. After that, every attempt to run the application leads to immediate redirection to localhost.com. In addition to redirection, breakpoints stop working. When I check modules that are loaded in Visual Studio(ctrl+alt+u), so MyProject.dll is missing.
In work's pc, AVG is installed. Maybe the antivirus causes this?
Please help me to understand why it is all happening in my works' pc while in my pc the same works perfect?
Thank you
TheAteist
28-Sep-10 4:51am
View
Reason for my vote of 5
Automatic vote of 5 for accepting answer.
Show More