if (e.Row.Cell[0].Text.Equals("mytest"))
...
改成
if ("mytest".Equals(e.Row.Cell[0].Text))
...
可避免因為e.Row.Cell[0].Text如果是空值而造成程式exception.
if (e.Row.Cell[0].Text.Equals("mytest"))
if ("mytest".Equals(e.Row.Cell[0].Text))
$("form[name='myform'] select[name^='att']").each(function(){
alert($(this).val());
});
if ($.browser.name == "chrome")
alert("google chrome!");
var is_chrome = navigator.userAgent.toLowerCase().indexOf('chrome') > -1;
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" />
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
[ServiceContract]
public interface ITestService
{
[OperationContract]
void DoWork();
[OperationContract]
string GetLogFilePath();
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using System.ServiceModel.Activation;
using System.Web;
[ServiceBehavior]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
public class TestService : ITestService
{
public void DoWork()
{
}
public string GetLogFilePath()
{
string logFile = "~/res/iislog/100/ex07021023.log.gz";
return HttpContext.Current.Server.MapPath(logFile);
}
}