|
how to find whether div style is already visible or hidden using jquery in aspx page.
i have now like
<pre>if( $('#obj').css('display') == "none" )
{
alert('hi');
}
else
{
alert('hi%');
}</pre>
|
|
|
|
|
if( $('#obj').is(":visible") == true )
{
alert('div is visible');
}
else
{
alert('div is hidden');
}
|
|
|
|
|
Thanks for your reply ,
my hidden is open but it still shows invisible.
pls advice me
function expandcollapse(obj,row)
{
debugger;
alert(obj+'expandcollapse');
var div = $('#obj');
var img = 'img' +obj;
alert($('div').css('display'))
}
|
|
|
|
|
|
Hi all
I need to get backup of my database(sql 2005 & above) in script format not in.bak format.How can I do this?
I need all like tables,& table records,Store procedure etc in script format this is important.
Any help would be appreciated......
Amit
|
|
|
|
|
Hi friends
I have defalut.aspx page in My web Application. I want to load dynamic content into this page.
for example if i have url "http://www.cricinfo.com" which contains html content right. so i want to load this content into my default.aspx page.
Please help me how to do it?
|
|
|
|
|
I think you can use iframe for achieving this.
|
|
|
|
|
You can use Streamreader to read the content and assign it to the control(Ex. Label) on your default.aspx page.
We successfully implent it. However we have the permission to access the data from another website.
|
|
|
|
|
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
|
|
|
|