小编Pic*_*ght的帖子

许可.Net网站

我想知道网站许可的首选方法是什么?

我使用可编辑的APSX文件分发我的网站的预编译版本,后面的代码被编译到每个页面的单独的DLL中.

我曾想过在每个页面中实现某种文本注入,类似于Telerik控件在使用试用版时所做的操作.如果使用许可版本,此演示文本将消失.

我认为的一种方法是让网站联系Web服务以确定许可证状态,但如果Web服务因任何原因而关闭,这将是一个问题.

谢谢

asp.net licensing

2
推荐指数
1
解决办法
679
查看次数

如何从Windows 2008 Server上的ASP应用程序发送电子邮件

我的ASP,经典ASP应用程序在Windows 2008 Server上给我一个服务器错误.它在Windows 2003服务器上运行正常.该错误是500内部服务器错误.CDO不能在Windows 2008上运行吗?

编辑 错误是:传输无法连接到服务器.

这是我的邮件功能:

function SendMail(mailFrom, mailTo, mailSubject, mailBody, bHtml)
Const cdoSendUsingMethod        = _
"http://schemas.microsoft.com/cdo/configuration/sendusing"
Const cdoSendUsingPort          = 2
Const cdoSMTPServer             = _
"http://schemas.microsoft.com/cdo/configuration/smtpserver"
Const cdoSMTPServerPort         = _
"http://schemas.microsoft.com/cdo/configuration/smtpserverport"
Const cdoSMTPConnectionTimeout  = _
"http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout"
Const cdoSMTPAuthenticate       = _
"http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"
Const cdoBasic                  = 1
Const cdoSendUserName           = _
"http://schemas.microsoft.com/cdo/configuration/sendusername"
Const cdoSendPassword           = _
"http://schemas.microsoft.com/cdo/configuration/sendpassword"
Const smtpServer = "localhost"

Dim objConfig  ' As CDO.Configuration
Dim objMessage ' As CDO.Message
Dim Fields     ' As ADODB.Fields

' Get a handle …
Run Code Online (Sandbox Code Playgroud)

smtp asp-classic windows-server-2008

2
推荐指数
1
解决办法
1万
查看次数

如何在遍历文件夹树时删除文件

我不确定我是否正确地做了这个或者我的逻辑是否正确.

我试图去一个文件夹结构删除早于一定天数的文件,这部分我已经正确实现,删除空文件夹.

这一切都可以在一个循环中完成吗?
我在哪里删除文件夹?

我想删除最多3或4级的空文件夹.

    private static void TraverseTree(System.IO.DirectoryInfo folder, double days)
    {
        Stack<string> dirs = new Stack<string>();

        if (!folder.Exists)
            throw new ArgumentException();

        dirs.Push(folder.FullName);

        while (dirs.Count > 0)
        {
            string currentDir = dirs.Pop();
            string[] subDirs;
            try
            {
                subDirs = System.IO.Directory.GetDirectories(currentDir);
            }
            // An UnauthorizedAccessException exception will be thrown if we do not have
            // discovery permission on a folder or file. It may or may not be acceptable 
            // to ignore the exception and continue enumerating the remaining files and …
Run Code Online (Sandbox Code Playgroud)

c# filesystems delete-file

2
推荐指数
1
解决办法
2057
查看次数

为什么MVC应用程序中有这么多接口

我正在审查KIGG的代码,并注意到有很多接口.我对MVC很新,并且了解接口是什么,有点.

Interface如何在MVC中工作,为什么使用它?

asp.net-mvc interface kigg

2
推荐指数
1
解决办法
166
查看次数

如何在Objective-c中为iPhone创建关系对象

这是我的对象的接口:

@interface MyItem : NSObject {
 sqlite3 *database;
 NSInteger *primaryKey;
 NSInteger *accountKey;
 NSInteger *categoryKey;
 NSString *title;
 BOOL hydrated;
 BOOL dirty;
 NSData *data; // Why do I need this?
}
Run Code Online (Sandbox Code Playgroud)

主键将在Sqlite中自动生成,我在MyItem表中存储整数,帐户和类别的外键.

帐户和类别将有一个有意义的描述.我是否应该为描述添加属性?像这样:

NSString *accountDesc;
NSString *categoryDesc;
Run Code Online (Sandbox Code Playgroud)

因此,在我的Hydrate方法中,我可以加入类别和帐户.

这样做的最佳做法是什么?

我的目标是在App的初始启动时,我将显示一个带有标题和类别描述的Tableview.

iphone properties core-data objective-c

1
推荐指数
1
解决办法
696
查看次数

如何在SQL中进行透视

我不确定这是否会被称为旋转.

我的SQL 2005表[CustromerRoles]中的数据是这样的:

CustId  RoleId
2        4
2        3
3        4
4        1
4        2
Run Code Online (Sandbox Code Playgroud)

[角色]表:

RoleId  Role
1        Admin
2        Manager
3        Support
4        Assistant
Run Code Online (Sandbox Code Playgroud)

我想创建一个视图,以便:

SELECT*FROM [MYVIEW]会给我以下数据:

1和0将是位,以便我可以在UI显示器上显示带有复选框的网格.

CustId  Admin Manager Support Assistant
2         0     0       1        1
3         0     0       0        1
4         1     1       0        0
Run Code Online (Sandbox Code Playgroud)

到目前为止,我不知道如何去做这件事.

sql pivot sql-server-2005

1
推荐指数
1
解决办法
1188
查看次数

MVC中的基页等价物是什么

在我的ASP.Net网站上,我有以下代码,我可以在网站范围内使用.
我如何在ASP.Net MVC2中做同样的事情?

public class BasePage : Page
{
 public BasePage()
 {
    this.PreInit += new EventHandler(BasePage_PreInit);
 }

 /// <summary>Every page executes this function before anything else.</summary>
 protected void BasePage_PreInit(object sender, EventArgs e)
 {
    // Apply Theme to page
    Page.Theme = "Default";
 }
 public bool IsSiteAdmin(string userName)
 {
    if (System.Web.Security.Roles.IsUserInRole(userName, "SiteAdmin1"))
        return true;
    return false;
 }
}
Run Code Online (Sandbox Code Playgroud)

asp.net-mvc

1
推荐指数
2
解决办法
3489
查看次数

在Objective-c或iPhone编程中,"MyIdentifier"是什么意思

我对以下行"静态NSString*MyIdentifier = @"MyIdentifier";"感到困惑 在方法中:cellForRowAtIndexPath

那条线做什么?它只是创建一个指向NSString对象的随机指针并为其分配字符串吗?为什么它被称为MyIdentifier,我在很多例子中都看到了这一点.

#import "AddToFavorites.h"


@implementation AddToFavorites

- (id)initWithStyle:(UITableViewStyle)style {
  if (self = [super initWithStyle:style]) {
  }
  return self;
}


- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
  return 1;
}


- (NSInteger)tableView:(UITableView *)tableView 
numberOfRowsInSection:(NSInteger)section {
  return 5;
}


- (UITableViewCell *)tableView:(UITableView *)tableView 
cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *MyIdentifier = @"MyIdentifier";

UITableViewCell *cell = [tableView 
dequeueReusableCellWithIdentifier:MyIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero 
reuseIdentifier:MyIdentifier] autorelease];
}
// Configure the cell

return cell;
}

@end
Run Code Online (Sandbox Code Playgroud)

这是另一个例子,这个有一个不同的字符串CellIdentifier.

- (UITableViewCell *)tableView:(UITableView *)tableView …
Run Code Online (Sandbox Code Playgroud)

iphone cocoa-touch objective-c uitableview

0
推荐指数
1
解决办法
786
查看次数

如何使用实体数据模型和MVC在Repeater中显示数据

我试图遵循这个例子:使用实体框架(C#)创建模型类 .
我尝试这样做时收到错误:

ViewData.Model = _db.MovieSet.ToList();
Run Code Online (Sandbox Code Playgroud)

在我的intellisense中,我没有得到ToList()

这是代码:

using System.Linq;
using System.Web.Mvc;
using MovieEntityApp.Models;

namespace MovieEntityApp.Controllers
{
[HandleError]
public class HomeController : Controller
{
    MoviesDBEntities _db;

    public HomeController()
    {
        _db = new MoviesDBEntities();
    }


    public ActionResult Index()
    {
        ViewData.Model = _db.MovieSet.ToList();
        return View();
    }

}
}
Run Code Online (Sandbox Code Playgroud)

我试图在View上的Repeater中显示结果,任何人都可以帮助代码在后面的代码和ASPX页面中看起来像什么.

asp.net-mvc

0
推荐指数
1
解决办法
1702
查看次数

如何使用SPAN或DIV将所有内容包装在TD元素中

我做错了什么,我的html呈现如下:

<td colspan="2"><input id="ctl00_ContentPlaceHolder1_Login1_RememberMe"   
type="checkbox" name="ctl00$ContentPlaceHolder1$Login1$RememberMe" />  
<label for="ctl00_ContentPlaceHolder1_Login1_RememberMe">Remember me next time.  
</label></td>
Run Code Online (Sandbox Code Playgroud)
  1. 我想用跨度将所有内容包裹在TD中.
  2. 我们的想法是增加文本的字体大小"下次记住我".

到目前为止我有这个:

$(document).ready(function() {
        $("input:checkbox").css("border", "none");

        //$("input:checkbox").parent().addclass("checkboxtd");

        var parentTd = $("input:checkbox").parent();
        var prevToCheckBox = $("input:checkbox").prev();

        $(prevToCheckBox).css("border", "solid 1px red"); alert(prevToCheckBox);
        alert(prevToCheckBox.html());

        var parentofParent = parentTd.parent();

        $(parentTd).prepend("<span>");
        $(parentTd).append("</span>"); //+ "</span>"

        //parentTd.before("<div class=\"checkboxtd\"></div>");
        alert(parentTd.parent().html());

        //        $("input:checkbox").css("border", "none").prepend("<span>ss");
        //        $("input:checkbox").css("border", "none").prepend("<span>ss");
        //        $("h2").prepend("<span>ss");
        //        $('h2').append("</span>"); //+ "</span>"
    });
Run Code Online (Sandbox Code Playgroud)

警报输出(parentTd.parent().html());

<TD colSpan=2><INPUT id=ctl00_ContentPlaceHolder1_Login1_RememberMe 
style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none" type=checkbox name=ctl00$ContentPlaceHolder1$Login1$RememberMe>  
<LABEL for=ctl00_ContentPlaceHolder1_Login1_RememberMe>Remember me …
Run Code Online (Sandbox Code Playgroud)

jquery asp.net-membership jquery-selectors

0
推荐指数
1
解决办法
3080
查看次数