在Log4Net中,Debug方法和Info方法有什么区别?通常什么时候我应该使用一个而不是另一个?
例如:
try
{
// updating the customer object
log.Info ("before loading current customer"); //1
Customer objCustomer=GetCurrentLoggedInCustomer();
log.Info ("Current customer loaded "); //2
objCustomer.LastName="New name";
log.Info("Before saving"); //3
objCustomer.Save();
log.Info("Saved"); //4
}
catch(Exception ex)
{
log.Error(ex.Message); //5
}
Run Code Online (Sandbox Code Playgroud)
我应该在1,2,3,4位置使用Debug方法吗?
我有一个用VB 6编写的DLL和另一个用Visual Studio 2005(VB.NET)编写的DLL.
现在我想从我的.NET DLL调用VB DLL的方法.我该怎么办?有什么想法吗?
我在我的机器上安装了WAMP,我正在开发一个PHP网站.任何人都可以告诉我要更改哪些设置,以便在浏览器中显示所有错误/警告消息?
提前致谢
在Mozilla和非IE浏览器中,如果选择列表的选项长度大于选择的宽度,则它将显示.但是在IE中,它会将选项裁剪到选择的宽度.
有没有办法让IE的选择行为像非IE浏览器一样?
我试图创建在Microsoft Outlook中的约会使用下面的code.While运行这个程序(2003),另一人的压延机,该任命是得到保存在我的calender.But不会发送给收件人.
try
{
Microsoft.Office.Interop.Outlook.Application app = null;
Microsoft.Office.Interop.Outlook.AppointmentItem appt = null;
app = new Microsoft.Office.Interop.Outlook.Application();
appt = (Microsoft.Office.Interop.Outlook.AppointmentItem)app
.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
appt.Subject = "Meeting ";
appt.Body = "Test Appointment body";
appt.Location = "TBD";
appt.Start = Convert.ToDateTime("12/23/2009 05:00:00 PM");
appt.Recipients.Add("smuthumari@mycompany.com");
appt.End = Convert.ToDateTime("12/23/2009 6:00:00 PM");
appt.ReminderSet = true;
appt.ReminderMinutesBeforeStart = 15;
appt.Importance = Microsoft.Office.Interop.Outlook.OlImportance.olImportanceHigh;
appt.BusyStatus = Microsoft.Office.Interop.Outlook.OlBusyStatus.olBusy;
appt.Save();
appt.Send();
}
catch (COMException ex)
{
Response.Write(ex.ToString());
}
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?任何人都可以帮我解决这个问题吗?
在SQL Server中,如何使用一个查询将多个列的值放在变量中?
例如:我的查询是:
SELECT ET.ID,ET.Description,ET.DefaultTemplateText
FROM TBL_EMAILTEMPLATE ET
WHERE ET.NAME='OneWeekReminder'
Run Code Online (Sandbox Code Playgroud)
我想将列值放在变量中.
我正在考虑为我们的产品开发考虑一个Web应用程序开发框架.我想构建一个ASP.NET应用程序,其中包含许多子模块.我的要求是:
该应用程序将是一套不同的模块,如CRM,Bugtracker,库存管理,财务管理等.
每个模块都应该有自己的DLL.
一个项目应该是应用程序的外部容器(如框架),并且该项目应该将解决方案中的所有其他模块(类型为Web应用程序)引入外部容器.(有些事我们在HTML中有框架).因此,我们将仅在一天结束时发布外部容器Web应用程序,并通过该方式访问所有其他Web应用程序项目.
我想为每个模块都有单独的DLL,所以当我部署控制整个套件的单个DLL时,我不必担心应用程序崩溃.
我不确定我的想法是否正确.我正在寻找的最终结果是一个维护良好,有组织和模块化的Web应用程序套件.
它是ASP.NET Web表单,而不是MVC.我将使用VS2010进行开发.
这样做的最佳方法是什么?
编辑:
术语外部容器意味着它就像一个母版页,它有各种模块的链接,各种模块并不总是在同一个项目中.它们可以是同一解决方案下的独立项目.而且我的印象是,到一天结束时,我将只发布该项目,它将带来各种模块.
对MVC来说很新.尝试提交包含静态DropDownListFor的表单时,我收到以下异常.
The ViewData item that has the key 'CurrentPosition' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: The ViewData item that has the key 'CurrentPosition' is of type 'System.String' but must be of type 'IEnumerable<SelectListItem>'.
Source Error:
Line 36: @Html.LabelFor(m => m.CurrentPosition, new { …Run Code Online (Sandbox Code Playgroud) 我有一个网页,其中嵌入了一个flash文件.闪存文件正在进行一个包含4个问题的测验.当用户回答第一个问题时,将显示第二个问题.这个闪存被嵌入一个名为divFlashcontent.Now的div中.我想隐藏并显示inbetween之间的测验.Ex:当用户点击一个按钮("暂停")时,我想隐藏测验.当他点击"继续"按钮时,我想继续(显示)测验.我正在使用jquery show()方法和hide方法.但问题是,当我调用show方法时,flash内容再次加载(从头开始显示测验).它没有显示我们点击暂停按钮的阶段.我怎么解决这个问题?我希望flash能够处于隐藏的同一个阶段
我不能使jQuery的延迟功能与append函数一起工作.怎么了?有没有办法让它发挥作用?我想避免setTimeout直接使用,让客户更容易理解,他们将自己维护,没有任何经验.
我的代码:
$('#chatwindow').append('test').delay(2000).append('test');
Run Code Online (Sandbox Code Playgroud)
在这段代码中,我同时打印'testtest',delay被忽略了.
javascript ×2
jquery ×2
.net ×1
asp.net ×1
asp.net-mvc ×1
automation ×1
c# ×1
dll ×1
flash ×1
html ×1
html-select ×1
interop ×1
log4net ×1
logging ×1
modularity ×1
outlook-2003 ×1
php ×1
razor ×1
sql ×1
sql-server ×1
t-sql ×1
vb6 ×1
wamp ×1