那个逮逮逮
那个逮逮逮
学富五车
关注数: 7
粉丝数: 7
发帖数: 1,037
关注贴吧数: 10
关于ObjectDataSource控件引用自己写的类,总是出错求大神指点。 public class RMovies//RMovies.cs代码 { private readonly string _conString; public void UpdateMovie(int id, string Title, string Director) { SqlConnection con = new SqlConnection(_conString); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "update Movies set Title=@Title,Director=@Director"; cmd.Parameters.AddWithValue("@Title", Title); cmd.Parameters.AddWithValue("@Director",Director); cmd.Parameters.AddWithValue("@Id", id); using (con) { con.Open(); cmd.ExecuteNonQuery(); } } public SqlDataReader Getmovie() { SqlConnection con = new SqlConnection(_conString); SqlCommand cmd = new SqlCommand(); cmd.Connection = con; cmd.CommandText = "select Id,Title,Director from Movies"; con.Open(); return cmd.ExecuteReader(CommandBehavior.CloseConnection); } public RMovies() { _conString = WebConfigurationManager.ConnectionStrings["Movies"].ConnectionString; } } <div>//ShowMovies.aspx的代码 <asp:GridView ID="grdMovies" DataSourceID="srcMovies" DataKeyNames="Id" AutoGenerateEditButton="true" runat="server"></asp:GridView> <asp:ObjectDataSource ID="srcMovies" TypeName="RMovies" SelectMethod="Getmovie" UpdateMethod="UpdateMovie" runat="server"></asp:ObjectDataSource> </div> 未能找到在 ObjectDataSource“srcMovies”的 TypeName 属性中指定的类型。 是哪里出错?
【袁铭阳】怎样才能找得到前几天倾城文字的广播稿呢? 一直在听倾城之约 前几天读的一篇倾城文字 让我感触很大 这几天也一直在想 我把那篇文章的题目忘记了 谁能告诉我怎样才能找到那篇文章吗?
帮忙看看 我编译时总是说malloc没定义 可是都改了还是不行 #include "stdafx.h" #include "stdio.h" #include"stdlib.h" #include"malloc.h" #include "conio.h" #define TRUE 1 #define FALSE 0 #define NULL 0 #define flag -1 /* 单链表的结点类型 */ typedef struct node {int data; struct node *next; } node; /* 初始化单链表 */ node * Init( ) { node * L; L=(node *)malloc(sizeof(node)); L->next=NULL; return L; } /* 创建单链表 */ node * Creat( ) { node * L=Init(),*p,*r; int x; r=L; printf("please input data,input -1 is end\n"); scanf("%d",&x); while (x!=flag) {p=(node *)malloc(sizeof(node)); p->data=x; r->next=p; r=p; scanf("%d",&x); } r->next=NULL; return L; } /* 求单链表长度 */ int getLength ( node * L) {node * p; int j; p=L->next; j=0; while(p!=NULL) { j++;p=p->next; } return j; } /* 遍历输出单链表 */ void out(node * L) { node * p; p=L->next; while(p!=NULL) {printf("%d ",p->data); p=p->next; }} /* 替换操作 */ node * replace(node * L,int x,int y) { node * p; p=L->next; while(p!=NULL) {if(p->data==x) p->data=y; p=p->next; } return L; } void main() { int x,y; node * L,*L1; L=Init(); printf("the length is%d\n",getLength(L)); L1=Creat(); out(L1); printf("the length is%d\n",getLength(L1)); printf("the length is%d\n",getLength(L)); printf("zhi xing ti huan cao zuo ,qing shu ru x=?y=?\n"); scanf("%d%d",&x,&y); L=replace(L1,x,y); printf("the length is%d\n",getLength(L)); out(L); printf("\n"); out(L1); getch(); }
求一个二维数组的问题 让一个二维数组的各个元素除以正对角线的元素,求出新的二维数组: 能给个具体思路吗?
请高手 赐教 有500个小朋友拉成一个圆圈,从其中一个小朋友开始依次编号1-500,从1号小朋友开始循环1-3报数,数到3的小朋友就退出。求最后一个出局的?
从来到学校就一直情绪低落 怎么办? rt
爆一张我的手表照片 那个女的 不爆图就删我扣扣 扯淡...
《爱情公寓3》终于快要上映了.好期待 7月30在安徽 深圳卫视首播,,,哈哈,又可以看到**曾小贤啦..
警告后来的学弟们 警告学弟: 你们的学姐是我们的,我们的学妹还是我们的,必要时你们也是我们的。
看到几米的画本 掉落深井,我大声呼喊,等待救援....天黑了,黯然低头,才发现水面满是闪烁的星光。我总是在最深的绝望里,遇见最美丽的惊喜。
好几天没见金牛了... @stunner金牛
《爱情公寓3》终于快要上映了.好期待 7月30在安徽 深圳卫视首播,,,哈哈,又可以看到**曾小贤啦..
警告后来的学弟们 警告学弟: 你们的学姐是我们的,我们的学妹还是我们的,必要时你们也是我们的。
看到几米的画本 掉落深井,我大声呼喊,等待救援....天黑了,黯然低头,才发现水面满是闪烁的星光。我总是在最深的绝望里,遇见最美丽的惊喜。
1
下一页