小编Bhr*_*tel的帖子

将值从页面传递到用户控件

我在主页面的两个标签中存储名称和姓氏.我在类中也有这些值(类没有做太多但是我将它们用于将来的扩展).我有一个用户控件,它将发送一个名称和姓氏为正文的电子邮件.

我的问题是如何将标签或类变量值转换为用户控件的body变量?

c# asp.net user-controls

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

在powerpoint 2007中调整图片大小

我环顾四周.我能找到的只是在Excel或Excel中调整大小.

我正在从pdf粘贴一张图片,需要点击一下调整大小和定位.

powerpoint powerpoint-vba

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

单击链接按钮时不会触发中继器的项目命令事件

我的中继器的 OnItemCommand 事件有问题。当我单击链接按钮时,它不会触发。我是否缺少任何环境变量

ASPX代码

<table>
    <!-- repResearchers begin, 0=display name, 1=url -->
    <asp:Repeater ID="repExtResearchers" Runat="server" OnItemCommand="deleteResearcher">
        <ItemTemplate>
            <tr>
                <td>
                    <a href="<%# ((System.String[])Container.DataItem)[1] %>">
                    <%# ((System.String[])Container.DataItem)[0] %></a>
                </td>
                <td>
                    <asp:LinkButton ID="lbDelete" runat="server" CommandName="del" 
                    CommandArgument = "<%# ((System.String[])Container.DataItem)[1]%>"
                    OnClientClick="if (!confirm('Are you sure do you want to delelte it?')) return false;">Delete</asp:LinkButton>
                </td>
            </tr>
        </ItemTemplate>
    </asp:Repeater>
</table>
Run Code Online (Sandbox Code Playgroud)

CS

protected void deleteResearcher(object sender, RepeaterCommandEventArgs e)
{
    string a;
    lblError.Text = e.CommandArgument.ToString();
    lblError.Visible = true;
}
Run Code Online (Sandbox Code Playgroud)

c# asp.net

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

将TableCell文本转换为超链接

我将sql查询中的数据提取到页面后面的cs代码中的asp表中

TableCell tCell1 = new TableCell();
tCell1.Text = myDataRow["tid"].ToString();
Run Code Online (Sandbox Code Playgroud)

我想将该id转换为超链接.我怎样才能做到这一点?

c# asp.net

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

ASP.NET登录控制连接字符串错误:不支持关键字:'元数据'

我正在使用正常连接,直到现在,一切都很顺利,但现在我已切换到数据实体模型,并使用新的连接字符串,我有这个错误...我如何保持我的实体字符串为我的数据操作和使用常规conn string仅用于登录控制?

Keyword not supported: 'metadata'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Keyword not supported: 'metadata'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[ArgumentException: …
Run Code Online (Sandbox Code Playgroud)

c# asp.net connection-string metadata c#-3.0

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

ASP.NET请求在此上下文中不可用

当我尝试打开网站时,我遇到了这个问题,我不知道它有什么问题.我用它编辑了堆栈跟踪

    Server Error in '/' Application.

    Request is not available in this context

    Description: An unhandled exception occurred during the execution of the current web  request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Web.HttpException: Request is not available in this context

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be …

asp.net

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