小编Ker*_*eks的帖子

显示radiobuttonlist内联

我的页面上有一些放射学家.我面临的问题是单选按钮的文本没有显示在内部的辐射按钮上.我已将repeatLayout放到Table和Flow中,但两者都没有工作.我试图添加一种显示风格:内联; 但这也不起作用(虽然它在复选框上做了,我想也许它也可以在这里工作).

这只是一个普通的放射学家:

<asp:RadioButtonList ID="radRace" CssClass="radioButtonList" runat="server" RepeatDirection="Horizontal">
    <asp:ListItem>Race 1</asp:ListItem>
    <asp:ListItem>Race 2</asp:ListItem>
    <asp:ListItem>Race 3</asp:ListItem>
    <asp:ListItem>Race 4</asp:ListItem>
</asp:RadioButtonList>

ul.radioButtonList { list-style:none; margin: 0; padding: 0;}
ul.radioButtonList.horizontal li { display: inline;}
Run Code Online (Sandbox Code Playgroud)

当repeatLayout在桌子上时:

在此输入图像描述

当repeatLayout在Flow上时:

在此输入图像描述

有人可以帮助我如何设置它,以便文本显示在单选按钮旁边...如果它有所作为,radioButtonList在一个表....


解:

这就是单选按钮列表现在的样子:

<asp:RadioButtonList ID="radRace" CssClass="radioButtonList" runat="server" RepeatDirection="Horizontal">
    <asp:ListItem>Race 1</asp:ListItem>
    <asp:ListItem>Race 2</asp:ListItem>
    <asp:ListItem>Race 3</asp:ListItem>
    <asp:ListItem>Race 4</asp:ListItem>
</asp:RadioButtonList>
Run Code Online (Sandbox Code Playgroud)

这是cssClass:

<style type="text/css">
    .radioButtonList { list-style:none; margin: 0; padding: 0;}
    .radioButtonList.horizontal li { display: inline;}

    .radioButtonList label{
        display:inline;
    }
</style>
Run Code Online (Sandbox Code Playgroud)

css asp.net radiobuttonlist

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

文件夹中的web.config允许全部或无用户身份验证

我有一个包含多个调查aspx页面的文件夹.我必须在这些aspx页面上设置权限.有5个不同的页面,只有一个允许某些用户访问.我添加了一个web.config文件来允许和拒绝用户,但它不起作用.如果我允许我的用户名并添加一个deny="?"我没有访问权限,但如果我添加另一个用户,请拿出我的deny选项,我获得登录系统的权限.如果我拒绝,我可以访问,但随后所有用户都可以访问该页面.

添加我的用户凭据并拒绝所有匿名用户我无法访问.有人可以指出我正在做错的方向吗?可能是因为它没有阅读或获取我的Windows登录凭据吗?我正在使用visual studio 2012,实体框架.

这就是我所做的:

   //Web Config that allows and denies:
   <?xml version="1.0"?>
        <configuration>
        <system.web>
    <authorization>
      <allow users="*" />
    </authorization>
     </system.web>

    <location path="QualityCheckSurvey.aspx">
    <system.web>
      <authorization>
        <allow users="DomainName\User2" />
        <deny users="?" /> 
      </authorization>
    </system.web>
    </location>
    </configuration>
Run Code Online (Sandbox Code Playgroud)

我已将我的身份验证模式设置为Windows.

编辑似乎权限设置不正确.但它仍然无法正常工作.当我拒绝*时,但允许USER1即使提示登录请求,用户也无法访问.登录窗口对话框即使已使用访问权限,也会继续弹出3次.让它否认?(匿名)允许每个人都有权访问,即使我拿出拒绝并且只有USER1的allow标签,其余的用户仍然可以访问...我现在在本地运行,但是甚至在设置时的IIS上与(Windows和基本身份验证)的身份验证完全相同....

编辑这是我正在使用的实际代码.此路径中只允许3个用户"".此web.config文件位于调查文件夹中,包含5种不同类型的调查.只有这一项调查应该允许某些用户,其余的调查任何人都可以访问....

     <?xml version="1.0"?>
<configuration>
  <system.web>
    <authorization>
      <allow users="*"/>
    </authorization>
  </system.web>

  <location path="QualityCheckSurvey.aspx">
    <system.web>

      <authorization>
        <deny users="?" />
        <allow users="OEP\kevinh, OEP\shabierg, OEP\heilened" />
        <deny users="*" />
      </authorization>

    </system.web>
  </location> 
Run Code Online (Sandbox Code Playgroud)

在我的主应用程序根目录中的web.cofin中,我已将身份验证模式设置为windows:

     <authentication mode="Windows">

<!--<forms loginUrl="~/Account/Login.aspx" timeout="2880" />-->
    </authentication>
Run Code Online (Sandbox Code Playgroud)

asp.net authentication iis-7 location web-config

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

在应用程序级别之外注册为allowDefinition ='MachineToApplication'的部分

将System.Data.Entity组合添加到我的Web配置后,我遇到了这个错误:使用注册为allowDefinition ='MachineToApplication'的部分超出应用程序级别是错误的.此错误可能是由于未在IIS中将虚拟目录配置为应用程序引起的.

我删除了obj和bin文件夹,我删除了行身份验证="windows",尝试重新打开,因为有人说它有效,我检查了主文件夹中只有1个web.config(实体框架 - 文件夹形式,型号,DAL和BLL)......

还有什么其他原因会发生这种情况?我到处搜索,这基本上是我发现的上述原因....

这是我的web.config,如果它有所不同:

    <configuration>
  <connectionStrings>
    <add name="ApplicationServices"
     connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
     providerName="System.Data.SqlClient" />
    <add name="CStringVKB" connectionString="Data Source=.;Initial Catalog=VKB;Persist Security Info=True;User ID=websiteservice;Password=websiteservice" providerName="System.Data.SqlClient" />
  </connectionStrings>
  <system.web>
    <compilation debug="true" optimizeCompilations="true" targetFramework="4.0" >
      <assemblies>
        <add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
      </assemblies>
    </compilation>
    <!--<authentication mode="Windows">
      <forms loginUrl="~/Account/Login.aspx" timeout="2880" />
    </authentication>-->
     <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
         enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
         maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
         applicationName="/" />
      </providers>
    </membership>
    <profile>
      <providers>
        <clear/>
        <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
      </providers>
    </profile>
   <roleManager …
Run Code Online (Sandbox Code Playgroud)

asp.net directory virtual entity-framework

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

尚未为数据源"请求"提供数据源实例

我在我的reportviewer上收到错误,我不知道如何纠正这个错误....我得到的错误是:"没有为数据源'Request'提供数据源实例." 我试过寻找这个,但找不到任何我能看到的错误,有人可以指点我正确的方向吗?这就是我的reportvierer的样子:

    <rsweb:ReportViewer ID="rptViewer" runat="server" Height="654px" 
Width="924px" Font-Names="Verdana" Font-Size="8pt" 
    InteractiveDeviceInfos="(Collection)" WaitMessageFont-Names="Verdana" 
    WaitMessageFont-Size="14pt">
    <LocalReport ReportPath="Report.rdlc">
    </LocalReport>
Run Code Online (Sandbox Code Playgroud)

这是我用于reportviewer的代码:

    SqlConnection conn;

protected void Page_Load(object sender, EventArgs e)
{
    conn = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);

    conn.Open();

    if (!Page.IsPostBack)
    {
        runRptViewer();
    } 

}
    private DataTable getData()
{
    DataSet dss = new DataSet();
    string sql = "";
    sql = "SELECT CC_Request.Company, CC_Request.Attention, CC_Request.Telephone, CC_Request.Email, CC_Items.Model, CC_Items.SerialNo, CC_ItemsRequested.Item, CC_ItemsRequested.Quantity, CC_ItemsRequested.Price, CC_ItemsRequested.ModelID, CC_Items.RequestID FROM CC_Request INNER JOIN CC_Items ON CC_Request.RequestID = CC_Items.RequestID INNER JOIN CC_ItemsRequested ON CC_Items.ModelID = CC_ItemsRequested.ModelID WHERE …
Run Code Online (Sandbox Code Playgroud)

c# datatable reportviewer datasource rdlc

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

按钮事件未在javascript中触发

我添加了一个jquery模式弹出窗口来保存特定设备的上传文件.弹出模式,取消按钮工作,但我无法弄清楚如何让保存按钮激活oncl​​ick事件...

这就是我所做的:

     $(function () {
        $("#dialogCustUploads").dialog("destroy");
        $("#dialogCustUploads").dialog({
            title: "Upload Files",
            autoOpen: false,
            modal: true,
            resizable: false,
            width: 'auto',
            buttons: {
                Save: function () {
                    $(document.getElementById('<%=btnSave.ClientID %>')).click();
                },
                Cancel: function () {
                    $(this).dialog("close");
                }
            }
        });
    });

    function showCustUploads() {
        $(function () {
            $("#dialogCustUploads").dialog("open");
                    });
        $(".dialogCustUploads").parent().appendTo($("form:first"));  
    }


    <div id="dialogCustUploads" style="display: none">     
    <table style="width:100%;">
                <tr>
                    <td class="auto-style1">
                        <asp:Label ID="Label16" runat="server" Text="Client"></asp:Label>

                    </td>
                    <td>
                        <asp:Label ID="lblClientUploadName" runat="server"></asp:Label>
                    </td>
                </tr>
                    <tr>
                <td>
                    <asp:Label ID="Label19" runat="server" Text="Certificate no" ></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtCertificateNo" runat="server" Width="410px"></asp:TextBox> …
Run Code Online (Sandbox Code Playgroud)

javascript c# asp.net jquery

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