嗨我想从用户那里取一个输入并从网格中删除一些信息,我显示出来.为此,我想提出一个输入框/对话框,接受文本,当我点击对话框上的按钮,我想保存数据.是否可以创建一个新窗口或usecontrol?
我正在研究XML Web服务.我的客户端Web服务"客户端"在运行时具有服务器Web服务"服务"的wsdl的URL.为了使"客户"使用"服务",我需要"以编程方式"执行以下操作:
1)从"服务"或磁盘上的某个位置动态获取wsdl文件.2)以编程方式创建代理,即不使用wsdl.exe或添加Web引用.3)在创建的代理上调用方法.
有可能吗?如果有人做了,那么采取任何建议如何实现将是非常好的.
我有一个简单的应用程序,它将数据存储到名为 student 表的 sql server 数据库表中。表的设计如下 3 列。姓名、性别和注册时间(日期时间)。在我的 WPF 窗口中,我有三个字段可以将数据插入到表中。现在我想根据用户提供的输入(这是一个日期时间选择器)使用删除按钮。
如何从表中删除与用户提供的日期相比已有 7 天的数据。?
我想要一个可以从 c# 代码调用的存储过程。我可以尝试这样的事情,Select * from studenttable where registereddate < GetDate()-7但是我无法实现我应该做的......
我有一个Web应用程序,我有一个登录页面.如何对活动目录用户进行身份验证?
截至目前,我能够从活动目录中获取一些属性,最后我能够使用LDAP字符串与AD进行通信.我知道无法从AD中提取密码并根据用户输入的密码进行身份验证!!
有没有办法可以对活动目录用户进行身份验证?
到目前为止,这是我的代码
public class Userdetails
{
public static string ADPath = ConfigurationManager.AppSettings.Get(“ADPath”); // Get the ADAM Path from web config fiel
public static string ADUser = ConfigurationManager.AppSettings.Get(“ADUser”); //ADAM Administrator
public static string ADPassword = ConfigurationManager.AppSettings.Get(“ADPassword”); //ADAM Administrator password
public static DirectoryEntry GetUserDetails(string userID)
{
AuthenticationTypes AuthTypes; // Authentication flags.
// Set authentication flags.
// For non-secure connection, use LDAP port and
// ADS_USE_SIGNING |
// ADS_USE_SEALING |
// ADS_SECURE_AUTHENTICATION
// For secure connection, use SSL port and
// …Run Code Online (Sandbox Code Playgroud) 我在我的WCF服务中使用以下代码来调用另一个可能是也可能不是WCF服务的Web服务.
ChannelFactory<IService1> myChannelFactory = new ChannelFactory<IService1>
(myBinding, myEndpoint);
Run Code Online (Sandbox Code Playgroud)
所以我希望在xml文件中有一些信息,我从中读取各种服务端点,并希望将绑定信息传递给通道工厂,并根据配置XML文件中的信息调用其他服务.
所以我想每次使用不同的服务合同信息动态生成通道工厂.
是否可以在渠道工厂中使用各种服务具有不同的接口?
换句话说,从上面的代码我有IService1但是当我从xml文件中读取另一个服务信息时,我想用另一个接口创建一个通道?
我正在使用linq to xml查询将数据打包到xml文件的列表中.
var Customerlist = (from c in doc.Descendants("Customer")
select new
{
Name = c.Attribute("Name").Value.ToString()
}).ToList();
Run Code Online (Sandbox Code Playgroud)
试图以这种方式将列表传递到asp.net的下拉列表中.
ddlName.DataSource=CustomerList;
Run Code Online (Sandbox Code Playgroud)
我能够调试并看到数据源正在获取列表,但asp.net页面中的下拉列表不显示任何内容.
有人可以指导我错误的地方吗?
我有一个列表视图,在wpf Customername和Isvalid中有两个列.我正在使用linq to sql从我的sql表中获取数据.当我尝试将值更新到表时,我没有看到对表的任何更改.
当我点击保存按钮时,这是我的代码:
try
{
CustomersDataContext dataContext = new CustomersDataContext();
Customer customerRow = MyDataGrid.SelectedItem as Customer;
string m = customerRow.CustomerName;
Customer customer = (from p in dataContext.Customers
where p.CustomerName == customerRow.CustomerName
select p).Single();
customer.Isvalid=false;
dataContext.SubmitChanges();
MessageBox.Show("Row Updated Successfully.");
}
catch (Exception Ex)
{
MessageBox.Show(Ex.Message);
return;
}
Run Code Online (Sandbox Code Playgroud)
我可以看到我能够根据所选的客户名查询记录,但该值未更新.
如果有人能指出我在哪里错过了将"ISVALID"值更新为数据库的逻辑,我会很高兴.
可能重复:
使用JavaScript检测未保存的更改
我的Web应用程序有3个Web表单,我在我的网页中实现了验证.我想在我的web应用程序中实现isdirty功能.我想在用户点击注销时弹出我的网页中的消息框(这是一个loginstatus如果表格有任何变化.
环境:Asp.net VS2008 c#
我使用以下语法
XDocument config = XDocument.Load(@"path to the xml file");
Run Code Online (Sandbox Code Playgroud)
但是我在 c# 代码中包含此语句。我想让路径可配置,例如在应用程序的 web.config 文件中使用名称路径声明一个键,我应该能够通过 xdocument cofnig 在 c# 代码中获得它=xdocument.Load(路径)。
可以这样吗?
我试图在两个列表框之间移动列表框项目.在我为每个listbox.so创建两个arrraylists之前,我在移动列表框项目之前尝试将项目添加到arraylist.这是代码
foreach (string st in listbox1.Items)
{
arraylist1.Add(st1);
}
Run Code Online (Sandbox Code Playgroud)
但我得到一个exeption无法将'System.Web.UI.WebControls.ListItem'类型的对象强制转换为'System.String'类型.
我试图在我的ASP.NET网页中实现jQuery datetimepicker.
我正在尝试在我的代码中实现该示例.
运行应用程序时,不显示带时间的弹出日历.
<link rel="Stylesheet" href="jquery.ui.datetimepicker.css" type="text/css" />
<script src="Scripts/jquery.ui.datetimepicker.js" type="text/javascript"></script>
<script src="Scripts/jquery.ui.datetimepicker.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$('TextBox1').datetimepicker();
});
</script>
<body>
<form id="form1" runat="server">
<div>
<input type="text" id="TextBox1" />
</div>
Run Code Online (Sandbox Code Playgroud) c# ×10
asp.net ×6
linq-to-xml ×2
wpf ×2
jquery ×1
linq-to-sql ×1
wcf ×1
web-services ×1
wsdl ×1