最新评论
我的中文版vs 2005也是函数等的着色没有关联上,按照你的方法不行的
我想问一下,我主站有多个域名,子域名再怎么设置啊!
www.cnblogs.com和cnblogs.com可以吗?
非常感谢.的确遇到了这个问题,没想到居然是加载两次PostData.
个人理解:Dispose() 方法只是提供给用户一个清理非托管资源的地方,并不一定要在该方法内部将托管资源也清理掉。托管资源大可以交给Finalize方法去清理,不需要用户去关心(前提是你并不急于去清理这些托管资源),用户甚至根本不需重写FInalize方法。
例如:
public class FileOp : IDispose
{
private File m_file = null;
public FileOp()
{
m_file.Open(...);
}
public void Open(...)
{
m_file.Open(...);
}
public void Dispose()
{
m_file.Close();
}
public void Close()
{
m_file.Close();
}
}
public class Test
{
void main()
{
FileOp fp= new FileOp();
fp.Dispose();
// 虽然调用了Dispose()方法,仍可以使用fp对象
fp.Open(...)
fp.Close();
// 这里调用Close() 和Dispose() 的作用是一样的
fp.Open(...)
fp.Dispose();
}
}
不通过编译器生成,可以自己定义强类型吗?
实际项目中我们该怎么使用强类型的dataset?
@xwy
soapclientSinkProvider和myServerSinkProvider两个sink传送的格式不对等
上面
http://www.cnblogs.com/zhongzf/archive/2005/08/10/211252.html
这个例子不错。
在C#里是这样的,但在java里 不是这样.RealName()的结果是子类里的数据
能不能防止域名伪装欺诈呢?
比如说我在本地随便伪装一个二级站点,然后返回主站
@Zendy
现在大学课本也没有。相当一部分的计算机学生学完C++后还不知道继承/多态是怎么回事呢,因为学到这里的时候按教学进度已经要考试了。
怎么用编程方法注册啊?我网上下了个出错
服务端:
IDictionary props = new Hashtable();
props["name"] = "server";
props["port"] = "5555";
CompressionSink.myClientSinkProvider myclientSinkProvider = new CompressionSink.myClientSinkProvider(null, null);
CompressionSink.myServerSinkProvider myServerSinkProvider = new CompressionSink.myServerSinkProvider(null, null);
//实例化客户端压缩类
System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider soapclientSinkProvider = new SoapClientFormatterSinkProvider();
//实例化服务端压缩类
System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider soapserverSinkProvider = new SoapServerFormatterSinkProvider();
// serverSinkProvider.Next = new System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider();
// myServerSinkProvider.Next = serverSinkProvider;
myServerSinkProvider.Next = soapserverSinkProvider;
soapclientSinkProvider.Next = myclientSinkProvider;
ChannelServices.RegisterChannel(new HttpChannel(props, myclientSinkProvider, myServerSinkProvider));
客户端:
//试用压缩Sink
CompressionSink.myClientSinkProvider myclientSinkProvider = new CompressionSink.myClientSinkProvider(null, null);
CompressionSink.myServerSinkProvider myServerSinkProvider = new CompressionSink.myServerSinkProvider(null, null);
System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider soapclientSinkProvider = new System.Runtime.Remoting.Channels.SoapClientFormatterSinkProvider();
System.Runtime.Remoting.Channels.SoapServerFormatterSinkProvider soapserverSinkProvider = new SoapServerFormatterSinkProvider();
myServerSinkProvider.Next = soapserverSinkProvider;
// soapclientSinkProvider.Next = myclientSinkProvider;
IDictionary props = new Hashtable();
// props["name"] = "HttpClientChannel";
//props["priority"] = 100;
ChannelServices.RegisterChannel(new HttpChannel(props, soapclientSinkProvider, soapserverSinkProvider));
如果不能壓縮DataSet,那麼如果要傳縮一個較大的DataSet時,往往出現RemotingException:我做過一個這樣的小統計,當我只top 前10000條記錄時,remoting能夠傳回數據,select top 20000時,就出錯了。然,在專案中寫明top也不是明智之舉,樓主有沒有好的建議提供!
另我上午有給你留言,不見回,只好跟在這里問!謝謝解答。
樓主,難道不能壓縮DataSet?我用你提供的Demo就可以運行,我也將服務端配置在了IIS當中。在壓縮DataSet 就出現樓上的所說的錯誤?樓主能否解答一下。
感覺沒想像中好用,想從NET 1.1 升級到2.0 需修改所有正在使用的頁面
讓人感到沒那麼想做,用Page Add Control 彈性好像比較大一點不受限制,不用作太大的修改,壞處看不到長相頁面
2.0里的masterpage不能实现多个回传表单在同一个页面出现,只是做一些美化工作的话貌似实际意义不大
www.zendy.com 和 www.zendx.com该如何共享?
你好,今天看了你的文章,我似乎快走出困惑的疑云了!请帮我看一下我的代码:
Imports System.Data
Imports System.Data.SqlClient
Partial Class EditBillPart2 Inherits System.Web.UI.Page
Protected CheckBoxArray(99) As System.Web.UI.WebControls.CheckBox
Protected TextBoxArray(99) As System.Web.UI.WebControls.TextBox
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim con As SqlConnection
Dim sql As String
Dim cmd As SqlCommand
Dim reader As SqlDataReader
Dim i As Integer
If Not IsPostBack Then
DropDownListType.Items.Add("全部职工")
con = New SqlConnection(ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString.ToString)
sql = "SELECT DISTINCT 身份类型 FROM Worker"
cmd = New SqlCommand(sql, con)
con.Open()
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Do While reader.Read()
DropDownListType.Items.Add(reader("身份类型"))
Loop
con.Close()
End If
con = New SqlConnection(ConfigurationManager.ConnectionStrings("BillConnectionString").ConnectionString.ToString)
If DropDownListType.SelectedValue = "全部职工" Then
sql = "SELECT 姓名 FROM Worker"
Else
sql = "SELECT 姓名 FROM Worker WHERE 身份类型='" + DropDownListType.SelectedValue + "'"
End If
cmd = New SqlCommand(sql, con)
con.Open()
reader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
i = 1
Do While reader.Read()
CheckBoxArray(i) = New CheckBox
CheckBoxArray(i).Text = reader("姓名")
CheckBoxArray(i).Checked = False
CheckBoxArray(i).Width = 80
Panel1.Controls.Add(CheckBoxArray(i))
TextBoxArray(i) = New TextBox
TextBoxArray(i).Text = "0"
Panel1.Controls.Add(TextBoxArray(i))
i = i + 1
Loop
reader.Dispose()
cmd.Dispose()
con.Close()
con.Dispose()
End Sub
End Class
以上的代码是为了实现以下效果:
在Aspx页面上有一个DropDownList,设置其AutoPostBack="True";一个Panel.运行后,从数据库中加载所有的人员,动态生成CheckBox.当用户选择不同的用户类型(DropDownList)时,重新加载不同的用户到Panel中.
现在的问题是:当用户选择一个人后(CheckBox),然后再重新选择一个新的DropDownList值,加载的新的人员应该都是没有被选定的.但是实际运行时,却不是的.比如说第一次选择第一行第二个CheckBox,第二次时,新的CheckBox在第一行第二个还是被选定.好象CheckBoxArray(i).Checked=False不起作用.也不知道我说清楚没有,我的EMail是123kaca@163.com.谢谢!
better than Sql Prompt:
SqlAssist
www.roundpolygons.com
{"System.FormatException: Header checksum illegal\r\n 於 NZlib.Compression.Inflater.DecodeHeader()\r\n 於 NZlib.Compression.Inflater.Decode()\r\n 於 NZlib.Compression.Inflater.Inflate(Byte[] buf, Int32 off, Int32 len)\r\n 於 NZlib.Streams.InflaterInputStream.Read(Byte[] b, Int32 off, Int32 len)"}
Visual Assist .NET 和Visual Assist 一样吗?
我想下个Visual Assist .NET 破解版的,但没找到
找到的是core什么破解的来着,但不知道怎么破解啊
请指点啊
FormsAuthentication.SignOut();
//get the expired cookie
HttpCookie lcookie2 = Context.Response.Cookies[FormsAuthentication.FormsCookieName];//此句不是很懂,response.cookies算是写cookies而不是读cookies,难道意思就是覆盖同名同域的cookie吗?但根据上面解释的英文get为取得意,有点相反,不知道是否是误解,还是怎么样?请帮忙释惑!谢谢
怎么只讨论用form验证呀,如果普通的纯cookie的二级域名应用,如何解决呢?共享登录可以实现,但注销就有问题,请帮忙解决!谢谢
I think it is very useable, and it is easy to use. Now I can directly get the words i want and I don't need to return to the table for finding the column names or table names.
thanks for your recommendation
请问我在一个域名下使用FormsAuthentication.RedirectFromLoginPage("UserName", false);,后,又转到登录页呀,我调试看的时候,System.Web.HttpContext.Current.User.Identity.IsAuthenticated为False,这是为什么呀?
完全可以的
第一作为主域,第二个作为二级域)
127.0.0.1 www.zendyhu.com
127.0.0.1 Second.zendyhu.com
我在Second.zendyhu.com登陆后,再到www.zendyhu.com ,还是共享cookie的
大哥!
向你请教一个问题:
这种方案, 可以用在二级域名下登录授权吗?
也就是说在二级域名下登录, 返回主域名, 授权依旧有效呢?
谢谢!!!
@Sunny
老兄,你把
Response.Cookies.Remove(FormsAuthentication.FormsCookieName); 注释掉,应该就可以了
我用了你的方法,为什么我还是无法退出登录阿?我的代码如下:
FormsAuthentication.SignOut();
HttpCookie lcookie2 = Response.Cookies[FormsAuthentication.FormsCookieName];
//set the cookie Domain
lcookie2.Domain = ".sunny.com";
Response.Cookies.Remove(FormsAuthentication.FormsCookieName);
他还是能够找到那个cookie,怎么把浏览器本地的cookies删除??
用那个Response.Cookies.Remove好象没用阿