|
hi guys very good morning to u all,
i have created vs2005 project and upgraded it into vs2008,
while convert its asked to take backup and i too did the same,and the project has been upgraded...,
now i like to get my vs2005 project back...,
its possible to get it same ?
Thanks & Regards,
Member 3879881,
please don't forget to vote on the post
|
|
|
|
|
If you selected backup option, then check for back up folder in the solution folder.
|
|
|
|
|
Hi,
I have question regarding using nested repeater. Can we use nested repeater in ascx file in asp.net ? Well I tried to use but the name of the child repeater is not recognizing. Can anybody has any idea on that ?
thanks
suchita
|
|
|
|
|
SayamiSuchi wrote: Can we use nested repeater in ascx file in asp.net ?
It's an ASP.NET control, why couldn't you use it?
Why don't you show what you have done so we can help point out what may be wrong.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sure. Thanks for the reply. Well these are the codes.
<asp:Repeater runat="server" id="Repeater1">
<HeaderTemplate>items<br /><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "catagoryname") %></t>
<br><%# DataBinder.Eval(Container.DataItem, "catagorydescription") %>
<asp:Repeater ID="Repeater3" runat="server">
<ItemTemplate>
<br>Items: <%# DataBinder.Eval(Container.DataItem,"ItemName")%></t></t></t><%# DataBinder.Eval(Container.DataItem, "Amount") %>
<br><%# DataBinder.Eval(Container.DataItem, "ItemDescription") %></br>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<separatortemplate>
<br />
<br />
<br />
</separatortemplate>
</asp:Repeater>
I have these in my ascx page.
suchita
|
|
|
|
|
You won't be able to access the Repeater3 control from the ascx directly as a new one is created for each databound item.
If you handle the OnItemDataBound event on Repeater1 you'll be able to access the Repeater3 control using:
e.Item.FindControl("Repeater3")
|
|
|
|
|
Martin Jarvis wrote: You won't be able to access the Repeater3 control from the ascx directly
Why not? See below.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thank you for the reply but still it didnt recognize Repeater3..
suchita
|
|
|
|
|
You have not bound the nested Repeater so of course it will not display anything.
<asp:Repeater ID="Repeater3" runat="server" DataSource='<%# ((SiteMapNode)Container.DataItem).ChildNodes %>'>
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thank you for the reply but adding that line still couldn't recognize the Repeater3 ..
suchita
|
|
|
|
|
SayamiSuchi wrote: couldn't recognize the Repeater3
Please clarify what you mean by this.
The example was for a nested Sitemap, you will of course need to adjust it to your usage.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I am taking datasource from the dataset which i passed it to the repeater1.I also tried like this:
<asp:Repeater runat="server" id="Repeater1">
<HeaderTemplate>items<br /><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "catagoryname") %></t>
<br><%# DataBinder.Eval(Container.DataItem, "catagorydescription") %>
<asp:Repeater ID="Repeater3" runat="server" DataSourceID="DataSourceMember">
<ItemTemplate>
<br>Items: <%# DataBinder.Eval(Container.DataItem,"ItemName")%></t></t></t><%# DataBinder.Eval(Container.DataItem, "Amount") %>
<br><%# DataBinder.Eval(Container.DataItem, "ItemDescription") %></br>
</ItemTemplate>
</asp:Repeater>
<asp:SqlDataSource ID="DataSourceMember" runat="server" ConnectionString="server=myComp;uid=sa;pwd=sa;database=ItemCat" SelectCommand="SELECT * FROM items where catID = '<%# DataBinder.Eval(Container.DataItem,"ID") %>'" \>
</ItemTemplate>
<separatortemplate>
<br />
<br />
<br />
</separatortemplate>
</asp:Repeater>
erros is :
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: The server tag is not well formed.
Source Error:
Line 193: </ItemTemplate>
Line 194: </asp:Repeater>
Line 195: <asp:SqlDataSource ID="DataSourceMember" runat="server" ConnectionString="server=myComp;uid=sa;pwd=sa;database=ItemCat" SelectCommand="SELECT * FROM items [ACN] Where catID = '<%# DataBinder.Eval(Container.DataItem,"ID") %>'" \>
Line 196:
suchita
modified on Monday, July 26, 2010 2:10 PM
|
|
|
|
|
Now we finally get to the issue, "Parser Error Message: The server tag is not well formed". You could have saved a few steps and gave this information at the beginning.
This is not the best way to accomplish this. You understand you are going to create a new SqlDatasource for each item in the parent list? Handle the ItemDataBound event of the parent repeater and assign the datasource, perferably from a cached source.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
itemDataBound event is like this right:
void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
{
RepeaterItem item = e.Item;
if ((item.ItemType == ListItemType.Item) ||
(item.ItemType == ListItemType.AlternatingItem))
{
Repeater3 = e.Item.FindControl("Repeater3");
DataRowView drv = (DataRowView)item.DataItem;
Repeater3.DataSource = drv.CreateChildView("category_item");
Repeater3.DataBind();
}
}
but if i do like this, it give error as below:
Repeater3 doesn't exits..
while ascx.cs code is
<asp:Repeater runat="server" id="Repeater1">
<HeaderTemplate>items<br /><br /></HeaderTemplate>
<ItemTemplate>
<b><%# DataBinder.Eval(Container.DataItem, "catagoryname") %></t>
<br><%# DataBinder.Eval(Container.DataItem, "catagorydescription") %>
<asp:Repeater ID="Repeater3" runat="server">
<ItemTemplate>
<br>Items: <%# DataBinder.Eval(Container.DataItem,"ItemName")%></t></t></t><%# DataBinder.Eval(Container.DataItem, "Amount") %>
<br><%# DataBinder.Eval(Container.DataItem, "ItemDescription") %></br>
</ItemTemplate>
</asp:Repeater>
</ItemTemplate>
<separatortemplate>
<br />
<br />
<br />
</separatortemplate>
</asp:Repeater>
suchita
|
|
|
|
|
Repeater3 = e.Item.FindControl("Repeater3");
Of course it doesn't exist, what type is Repeater3? All you have is a name. You also understand FindControl needs to be cast to something useful?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
yes.
i did like this:
Repeater3 =(Repeater) e.Item.FindControl("Repeater3");
now i have another error shown.
The relation is not parented to the table to which this DataView points.
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: The relation is not parented to the table to which this DataView points.
Source Error:
Line 120: Repeater2 = (Repeater)e.Item.FindControl("Repeater2");
Line 121: DataRowView drv = (DataRowView)item.DataItem;
Line 122: Repeater2.DataSource = drv.CreateChildView("CategoryToItem");
Line 123: Repeater2.DataBind();
Line 124: }
suchita
modified on Monday, July 26, 2010 4:38 PM
|
|
|
|
|
RTFM
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sorry, I couldn't get that. Can you explain that please ?
I even included below code:
SqlCommand objCmd = new SqlCommand(query, cnx);
SqlDataAdapter objDA = new SqlDataAdapter(objCmd);
DataSet ds = new DataSet();
objDA.Fill(ds);
Repeater1.DataSource = ds;
Repeater1.DataBind();
DataColumn c1 = ds.Tables["category"].Columns["ID"];
DataColumn c2 = ds.Tables["Items"].Columns["CatID"];
dRel = new DataRelation("CategoryToItem", c1, c2);
ds.Relations.Add(dRel);
suchita
|
|
|
|
|
ROFL A+ man A+ ...
If at first you don't succeed ... post it on The Code Project and Pray.
|
|
|
|
|
I am doing localization in my application.
How can I localize data, which is populating from database.
That is, If I am putting some values in database which are predefined and is set explicitly .If I am populating this data in my Chinese culture, English characters are appearing.
Please help in same.
Thanks.
|
|
|
|
|
|
Hello All,
I am doing Localization in my application, and using following script for Post Date Alert for making sure user does not select date earliar than today..
Problem is if I login as Chinese culture or other except English, I choose date from calander which is greater than today, it gives popup and then display Todays date in English.
I am using EnableScriptGlobalization= "true" in ToolkitScriptManager so as calander will display in respective culture.
function checkDate(sender, args) {
if (sender._selectedDate > new Date()) {
alert("Alert");
sender._selectedDate = new Date();
sender._textbox.set_Value(sender._selectedDate.format(sender._format));
}
}
Thanks.
Shreshtha
|
|
|
|
|
Afer I moved my code to new machine am getting this error "System.Security.Policy.PolicyException: Required permissions cannot be acquired."
|
|
|
|
|
Do any of these[^] apply to you?
|
|
|
|
|
thanks for your reply.
still am facing the same issue.
|
|
|
|