Tag Archives: DataPager

[RESOLVED]Paging in Arabic

hey i want to make the numerioc pages in  my dataPager control appears like

                                                                      ……   5  4 3 2 1

and so on not from LTR

1 2 3 4….

how can i sloved it

note : im using ListView with Datapager thathas the following feilds

<asp:DataPager ID="DataPager2" runat="server" PagedControlID="ListView1"  
                PageSize="2" >
                
                <Fields>
                  
                        <asp:TemplatePagerField OnPagerCommand="TemplatePagerField_OnPagerCommand">
                        <PagerTemplate>
                         <asp:ImageButton ID="btnPrev" runat="server" CommandName="Previous" Text="Previous"   />
                         </PagerTemplate>
                          </asp:TemplatePagerField>
                  
                   
                        <asp:NumericPagerField  ButtonCount="2" Visible="true" ButtonType="Link"   />
                           
                     
                        
                        
                   
                   <asp:TemplatePagerField  OnPagerCommand="TemplatePagerField_OnPagerCommand" >

  <PagerTemplate>

   
<asp:ImageButton ID="btnNext" runat="server" CommandName="Next" Text="Next"   />

 

  </PagerTemplate>

</asp:TemplatePagerField> 

</feilds>

You amy wrap the datapager in div with dir="ltr" attribute

thx 4 your replay . i tried your post be4 and it didnt give me wut i need :S

Hi kirkato,

What I can think is to add button manually:

http://www.dotnetspider.com/resources/35134-Numeric-Paging-with-DataList-ASP-NET.aspx

Thanks,

thx 4 your reply but u didnt get me well . its Listview not datalist and im using Datapager which has emeded  numeric wut i need is to make numbers of paging from Right to left .. like this

54321

 

Hi kirkato,

Haven’t found any solution for DataPager. You can try to access the pager button in DataPager and change their order manually:

(LinkButton)DataPager1.Controls[0].Controls[0]    //get the first pager number or previous button

Thanks,

Thanks Vinija, it solved my problem

cannot locate the explorer

<div class=ForumPostBodyArea> <div class=ForumPostContentText> <div>I have installed the visual studio 2008 express edition</div> <div> </div> <div>before yesterday it run very well. but yesterday I open a web site which I do.When I press the button
Run(the arrow  in the menu) ,happen the error below:</div> <div>
Uable to attach to application ‘WebDev.WebServer.EXE’ (PID:1132) using ’3566F33214E7448′.A debugger is already attached.
Do you want to continue anyway?
                                                           Yes           No</div> <div>if you choose ‘Yes’ button will happen the information below : </div> <div>Unable to start program ‘http://localhost:1256/Ajax/Ajaxexample09.aspx
Cannot locate Microsoft Internet Explorer</div> <div> </div> <div>But when I browser the lonely page, it run good.</div> <div>I have installed the Microsoft Internet Explorer and IIS service. </div>

My computer’s opertion system is xp sp2 

</div></div>

<div> <div id=ctl00_ctl00_bcr_bcr_ctl00_PostList_ctl02_ctl07_ctl00_Container style="DISPLAY: none"> <div class=CommonInlineTagEditor>
<div style="PADDING-TOP: 4px; WHITE-SPACE: nowrap">

Select Tags… SaveCancel

</div></div><input id=ctl00_ctl00_bcr_bcr_ctl00_PostList_ctl02_ctl07_ctl00_AllTags type=hidden value=.net+3.5+framework&.net+3.5+framework&2008+beta+2+sql+data+update+delete+error+problem&2008+beta+2+sql+data+update+delete+error+problem&absolute+position&absolute+position&ajax&ajax&AJAX++VWD+2008&AJAX++VWD+2008&AJax++WebService++Cross-Domain&AJax++WebService++Cross-Domain&AjaxControlTookKit&AjaxControlTookKit&annoying+bugs&annoying+bugs&Application+Service&Application+Service&application+upload&application+upload&ASP&ASP&asp.net&asp.net&asp.net+1.0&asp.net+1.0&asp.net+2.0&asp.net+2.0&asp.net+ajax&asp.net+ajax&ASP.NET+Futures&ASP.NET+Futures&asp.net2.0&asp.net2.0&ASPX&ASPX&auto+position&auto+position&automatic+quote+inserting&automatic+quote+inserting&best+practice&best+practice&Bug&Bug&building+html+strict+web+sites&building+html+strict+web+sites&code+markup&code+markup&copy+rights&copy+rights&copy+web+site&copy+web+site&css&css&CSS+Apply+styles+tab&CSS+Apply+styles+tab&CSS+Styling+Options&CSS+Styling+Options&Data+connection&Data+connection&database&database&datapager&datapager&DataPager+ListView+Orca&DataPager+ListView+Orca&DBML&DBML&delete&delete&design+view&design+view&devenv&devenv&Direction%3dOutput&Direction%3dOutput&DLL&DLL&DNN&DNN&documentation&documentation&Dotnetnuke&Dotnetnuke&drag+and+drop&drag+and+drop&Dynamic+Languages&Dynamic+Languages&edit&edit&editing&editing&Environement+Variables&Environement+Variables&Frontpage+extensions&Frontpage+extensions&g&g&hosting&hosting&html&html&IIS+7.0&IIS+7.0&IIS+7.0+Frontpage&IIS+7.0+Frontpage&IIS6+compatibility+layer&IIS6+compatibility+layer&iis7&iis7&indexing&indexing&Installation&Installation&intellisense&intellisense&IronRuby&IronRuby&javascript&javascript&layout&layout&LINQ+2+SQL&LINQ+2+SQL&LINQDataSource&LINQDataSource&listview&listview&Mobile+controls&Mobile+controls&MS+Office&MS+Office&MS+Office+2003&MS+Office+2003&msiexec.exe&msiexec.exe&O%2fR+Designer&O%2fR+Designer&Office&Office&Office+2003&Office+2003&Orcas+Express&Orcas+Express&PATH&PATH&PictureBox&PictureBox&proxy&proxy&RAD+Controls&RAD+Controls&remove&remove&Repair&Repair&Reporting+add-in+Web+2008+Express&Reporting+add-in+Web+2008+Express&search&search&Security&Security&shared+hosting&shared+hosting&SilverLight&SilverLight&source+editor&source+editor&sql+2008&sql+2008&sql+server+express+2005&sql+server+express+2005&Starter+kits&Starter+kits&stylesheet&stylesheet&tabpanel&tabpanel&Telerik&Telerik&templates&templates&themes&themes&TookBox&TookBox&Troubleshooting&Troubleshooting&UI&UI&Uninstall&Uninstall&upload&upload&upload+bug&upload+bug&visual+sourcesafe+2005&visual+sourcesafe+2005&Visual+Studio&Visual+Studio&visual+studio+2008&visual+studio+2008&visual+studio+2008+beta&visual+studio+2008+beta&Visual+Web+Developer+2005+Express+Edition&Visual+Web+Developer+2005+Express+Edition&visual+web+developer+2008+express&visual+web+developer+2008+express&Visual+Web+Developer+2008+Express+Edition&Visual+Web+Developer+2008+Express+Edition&Visual+Web+Developer+2008+Express+Edition+-+Installation+Issues&Visual+Web+Developer+2008+Express+Edition+-+Installation+Issues&Visual+Web+Developer+2008+Express+Edition+-+Registration&Visual+Web+Developer+2008+Express+Edition+-+Registration&Visual+Web+Developer+2008+express+Edition+Error+Help&Visual+Web+Developer+2008+express+Edition+Error+Help&visual+web+developer+2008+server+control+design+view+master+page+ajax&visual+web+developer+2008+server+control+design+view+master+page+ajax&vs2008&vs2008&VWD&VWD&VWD+Express&VWD+Express&VWD+Express+2005&VWD+Express+2005&VWD+Express+2008&VWD+Express+2008&VWD+FTP+connexion+publishing&VWD+FTP+connexion+publishing&VWD+WAP+Orcas+Express&VWD+WAP+Orcas+Express&wcf&wcf&web+application+project&web+application+project&Web+Designer+Tools&Web+Designer+Tools&Web+Developer+Multiview+Table&Web+Developer+Multiview+Table&web+Method&web+Method&web+service&web+service&web+service+ajax&web+service+ajax&web+service+ajax+cache&web+service+ajax+cache&web+service+ajax+control+render&web+service+ajax+control+render&web+service+ajax+javascript&web+service+ajax+javascript&web+service+ajax+security&web+service+ajax+security&Web+Service+not+working+on+Server+Farm&Web+Service+not+working+on+Server+Farm&web+servicervice+ajax+databinding&web+servicervice+ajax+databinding&web+services&web+services&web+site&web+site&webmethod++html++json+escaping+repeater&webmethod++html++json+escaping+repeater&webRequest&webRequest&webservice&webservice&WebService+Ajax+DataSet&WebService+Ajax+DataSet&webservice+ajax+firefox&webservice+ajax+firefox&webservice+atlas+activity+indicator&webservice+atlas+activity+indicator&webservice+atlas+profile+security&webservice+atlas+profile+security&Webservice+decimal+separator&Webservice+decimal+separator&webservice+error+handling&webservice+error+handling&webservice+json+ajax&webservice+json+ajax&webservicevice+ajax+permission+error&webservicevice+ajax+permission+error&Windows+2008&Windows+2008&windows+communication+foundation&windows+communication+foundation&Xml&Xml&xml+webservice&xml+webservice&xmlscript&xmlscript&XslDebugProxy&XslDebugProxy></div>Filed
under:
</div>

Did you make any new AntiVirus installation or change the firewall configuration? if yes, then please review it.

Another suggestion is to repair the installation. Go to Add and Remove Program, choose VWDE 2008 and repair the installation.

Hope this helps.

 I’m receiving the same error as above "Cannot locate Microsoft Internet Explorer" using Visual Studio 2008 Professional version 9.0.021022.8 RTM.

I don’t have control over any anti virus software installation or changing the firewall, I have done a repair on the installation. I am still getting the error. I can right click on the .aspx page and view it and every thing works great. It only happens
when I try to view it through the debugger. Any help would be greatly appreciated. thanks

 

 

Visual Studio looks for the following registry key to locate Internet Explorer:

[HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionApp Pathsiexplore.exe] 

 

Open regedit and locate this key.

If its not present, then create one with the Default value pointing to your Internet Explorer location. Normally it will be
c:Program FilesInternet Exploreriexplore.exe.

If its already present then check the default value and correct it.

 

To check if its working, open run command, and type in ‘iexplore’ and it should launch the Internet Explorer.

Now try doing a F5 on your Visual Studio and it should work.

 

[RESOLVED]ListView and DataPager

<div class="post-text" itemprop="description">

I have a list view for which I have binded the List of images as datasource. Also I have a datapager for which I have defined 9 as pagesize. Now the problem is when I click on the image I am displaying a slideshow. So when I click only first 9 images are
only shown since other images are loaded only when I click on the second page in the datapager. Please let me know what is the best solution so that I will show only 9 images per page, but when I click on the image the slideshow will display all the images.

Thanks,

</div>

A good design for such a page is to show thumbnails in the ListView. A HoverMenuExtender or PopupMenuExtender or jQuery dialog can be used to show the full image when the user hovers over / clicks on the thumbnail. The popup will also have a link to show
a slideshow. The slideshow or the full image view should do a ajax call to retrieve the next image or full image respectively.

Hi

Recommand an article about how to Use ASP.NET 3.5 ListView & DataPager, here is the link below:

http://www.beansoftware.com/ASP.NET-Tutorials/ListView-DataPager.aspx

hope it helpful to u.

[RESOLVED]Element 'LinqDataSource' is not a known element … VS 2010 ASP.Net 4.0

I’m getting the below warning error in Visual Studio 2010 when I create a new ASP.Net 4.0 Web Application (WebForms or MVC2).

Element ‘LinqDataSource’ is not a known element…

I open VS, click on "New Project…", select Web / ASP.NET Web Application (.NET Framework 4).

Open the Default.aspx page

Double-click on LinqDataSource in the Toolbox

… and the LinqDataSource is inserted, but it contains no defaulted ID attribute, and there’s the above warning error.

I’ve done some Googling (if that’s a word) and found references to this problem in older (3.5 and prior) framework versions which suggest checking that the following exists in web.config:

<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">
<pages></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">
<controls></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x:
hidden; overflow-y: hidden;" id="_mcePaste">
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x:
hidden; overflow-y: hidden;" id="_mcePaste">
</controls></div> <div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste">
</pages></div> <div></div>

<pages>

<controls>

<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

</controls>

</pages>

<div>
</div><div>I don’t see these in the web.config for an ASP.Net 4.0 project, and from what I’ve read you shouldn’t need these in 4.0.</div><div>
</div><div>Am I doing something wrong?  Does anyone have any suggestions as to how to make the warnings go away?</div><div>
</div><div>Thanks!</div><div>
</div>

LinqDataSource is not a good control to be using for serious apps. I think its still used quite heavily in Dynamic Data but in most cases you should try to use the ObjectDataSource so that you can cleanly separate your concerns.

Lecturing you aside ([:)]) have you tried clicking the Website menu then choosing Add Reference and adding in a reference to System.Data.Linq? Actually not sure if its in that assembly. Its probably somewhere else but not sure where from MSDN docs:

Also are you sure you have targetted 4.0?

My question isn’t regarding the appropriateness of using the LinqDataSource control (Lecture noted), but that the IDE doesn’t seem to fully recognize its existance.

Yes, there is a reference listed for "System.Data.Linq" under the "References" folder.

I also see the same behavior when attempting to add the following controls to a default.aspx page:

  • DataPager
  • EntityDataSource
  • LinqDataSource
  • ListView
  • QueryExtender

Interestingly however, when I add the "Chart" control to the page, it adds the following line at the top of Default.aspx, and all warnings disappear!

<div style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;" id="_mcePaste"><%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %></div> <div></div>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<div>
</div><div>Very odd …</div><div>
</div><div>And yes, I am targeting 4.0.</div>

Might be your schema cache. Can you try the workaround mentioned in
this
post? 

Eureka!  That took care of it!

Thank you Bala!

I simply cleared my schema cache (see below) and my warnings went away…

As a workaround, you can try the following: 

Close VS, delete schema cache, and re-open VS. You can find the schemas under something like:

C:UsersPavelAppDataRoamingMicrosoftVisualStudio10.0ReflectedSchemas

 

It is safe to delete all files in this folder.

How do i get value form telerik.radlistview label to javascript

Hi,

I m using given below javascript

<script type = "text/javascript">
    function openRadWinNew() {

        var object2 = $find("<%=radVideo.ClientID %>");
        var url = object2._findChildControl("lblUrlValue").get_value();
        alert('Url is ' + url);
        radopen("VideoPlay.aspx?Video=" + url, "radWinScheme");
        return false;
    }

    function closeRadWindow() {
        $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
    }
   
     </script>

Also I am using radListView.. inside this I m using one label,name url value….

 <telerik:RadListView ID="radVideo" ItemPlaceholderID="VideoContainer" AllowPaging="true" AllowCustomPaging="true" runat="server" OnItemCommand="radVideo_ItemCommand" OnItemDataBound="radVideo_ItemDataBound" OnNeedDataSource="radVideo_NeedDataSource">
         <LayoutTemplate>
                <asp:PlaceHolder ID="VideoContainer" runat="server" />
                <telerik:RadDataPager ID="RadDataPager1" BorderWidth="0" BackColor="transparent" runat="server">
                    <Fields>
                        <telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">
                            <PagerTemplate>
                                <div style="text-align: right">
                                    <%-- <asp:ImageButton ID="imgBtnPrev" ImageUrl="~/images/zone-btn-prev.png" runat="server" />
                <asp:ImageButton ID="imgBtnNext" ImageUrl="~/images/zone-btn-next.png" runat="server" />--%>
                                </div>
                            </PagerTemplate>
                        </telerik:RadDataPagerTemplatePageField>
                    </Fields>
                </telerik:RadDataPager>
            </LayoutTemplate>
        
         <ItemTemplate>

                <div id="divVideo">
                    <div class="ContentArea">
                            <div class="leftpart">
                                <asp:HiddenField ID="hfId" Value='<%#Eval("VideoID")%>' runat="server" />

                                <asp:LinkButton ID="lnlVideoURL" runat="server"  CommandName="ShowVideo" OnClientClick="openRadWinNew(''); return false;">
                                 <asp:Image ID="imgSample" runat="server" Width="120" Height="90" />
                                  <asp:Image ID="imgIcon" runat="server" ImageUrl="~/images/video_play_button-red.png" style="position: relative; top:-70px; left:30px; opacity:0.6;filter:alpha(opacity=60); /* For IE8 and earlier */ " />
                                 
                               </asp:LinkButton>
                          </div>
                            <div class="rightpart">
                                <b> 
                                <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("Title")%>' />
                                </b>
                                <br />
                                <asp:Label ID="lblUrl" runat="server" Visible="false" Text='<%#Eval("Url")%>' />
                                 <asp:Label ID="lblUrlValue" runat="server"></asp:Label>
                           </div>
                             
                    </div>
               </div>
            </ItemTemplate>
        </telerik:RadListView>

Now I want to pass label ‘lblUrlValue’ text to javascript var ‘url’… how do i pass code behind when itemcommand ???

[RESOLVED]VS2010 performance anomaly

 

Hi. I recently decided to try out VS2010 to see what was new. So I downloaded a trial edition of VS2010 ultimate (why try less eh) and installed it on a backup of my dev box.

All went well and I decided to open a current ASP.NET project I’m working on that consists of a database and a bunch of pages with listviews charged with displaying the records.

So the project imports fine, I then start the app and hit a few of the pages. This is where I come across a significant problem.

One of the pages contains a listview that displays a bunch of records from the database. The customer has specifically asked to not use a datapager. This means the listview can consist of a few hundred rows at times (I apply other filters to keep the number
of records down). In VS2008 each row averages around 9ms to render (I use a stopwatch to keep an eye on performance and put the result in a label at the bottom of the page after the listview has finished rendering).

So under VS2010 the time to render each line jumps to ~150ms (and performance of the page backs this up. It’s slooooow).

Ok. So I figure I’ve got Ultimate for the trial – lets see if it’s extra features would be able to help me find the problem. So I start a performance monitoring session and hit the same pages before looking at the results.

Immediately I notice a difference. While the performance monitor is running the page seems much more responsive, practically it’s old self. The stopwatch result backs this up. 12ms. Not quite as good as in VS2008 but a bit of variance isn’t uncommon and
12ms isn’t bad.

So I figure that something somewhere must have needed to be cached and everything is now running fine. So I kill the performance monitoring session and start the app again and hit the same pages. 150ms. What the?!?

So I test it again and again, with and without the performance monitoring running. Across over 10 trial runs with a reboot in the middle the results are absolutely consistent. Without performance monitoring I get ~150ms and invariably poor performance. With
performance monitoring I get ~12ms and a responsive interface.

Has anyone seen this kind of anomaly before? Where should I be looking to try to find the cause? What could be causing the app to only perform better while it’s being performance profiled?

Any tips or suggestions are appreciated.

Darren.

Consider reporting this bug to:

http://connect.microsoft.com/VisualStudio

Submitted as suggested. ID 566258 

Why I cant run fancybox-with-video jQuery in IE 7 only?

Hi,

I m using fancybox-with-video for play video in web page. this query is run successfully in all browsers, but IE 7.

When i am try to perform this operation in IE7, i got error like,

   "This content cannot be displayed in a frame.
To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame."

How can I fix it?

My Jquery

fancybox-with-video
————————
jquery-1.2.6.min.js
jquery-latest.js
jquery.fancybox-1.0.0.js
jquery.pngFix.pack.js
swfobject.js

VideoCollection.aspx

<script type="text/javascript">

     $(document).ready(function () {
         $("a[rel*=fancyvideo]").fancybox({
                              overlayShow: true,
                              frameWidth: 720,
                              frameHeight: 400,
                               });
     });
  </script>

<body style="width:728px; overflow-x:hidden; overflow-y:hidden;" >
    <form id="form1" runat="server"  >
   

<div>
 <telerik:RadScriptManager ID="radScrptMgr" runat="server" />
     <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest = "RadAjaxManager1_AjaxRequest">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>

                </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            </telerik:RadAjaxManager>

 
        <br />
        <h1 >Video Gallery</h1>
        <telerik:RadListView ID="radVideo" ItemPlaceholderID="VideoContainer" AllowPaging="true" AllowCustomPaging="true" runat="server" OnItemCommand="radVideo_ItemCommand" OnItemDataBound="radVideo_ItemDataBound" OnNeedDataSource="radVideo_NeedDataSource">
         <LayoutTemplate>
                <asp:PlaceHolder ID="VideoContainer" runat="server" />
                <telerik:RadDataPager ID="RadDataPager1" BorderWidth="0" BackColor="transparent" runat="server">
                    <Fields>
                        <telerik:RadDataPagerTemplatePageField HorizontalPosition="RightFloat">
                            <PagerTemplate>
                                <div style="text-align: right">
                                    <%-- <asp:ImageButton ID="imgBtnPrev" ImageUrl="~/images/zone-btn-prev.png" runat="server" />
                <asp:ImageButton ID="imgBtnNext" ImageUrl="~/images/zone-btn-next.png" runat="server" />--%>
                                </div>
                            </PagerTemplate>
                        </telerik:RadDataPagerTemplatePageField>
                    </Fields>
                </telerik:RadDataPager>
            </LayoutTemplate>
        
         <ItemTemplate>

                <div id="divVideo">
                    <div class="ContentArea">
                            <div class="leftpart">
                                <asp:HiddenField ID="hfId" Value='<%#Eval("VideoID")%>' runat="server" />

                               <%-- <asp:LinkButton ID="lnlVideoURL" runat="server"  OnClientClick=<%# "openRadWin('" + Eval("VideoID") +"'); return false;"%>>
                                 <asp:Image ID="imgSample" runat="server" Width="120" Height="90" />
                                  <asp:Image ID="imgIcon" runat="server" ImageUrl="~/images/video_play_button-red.png" style="position: relative; top:-70px; left:30px; opacity:0.6;filter:alpha(opacity=60); /* For IE8 and earlier */ " />
                               </asp:LinkButton>--%>

                               <a id="avideo" runat="server" rel="fancyvideo" href="">
                                 <asp:Image ID="imgSample" runat="server" Width="100" Height="60" />
                                  <asp:Image ID="imgIcon" runat="server" ImageUrl="~/images/video_play_button-red.png" style="position: relative; top:-60px; left:-5px; opacity:0.6;filter:alpha(opacity=60); /* For IE8 and earlier */ " />
                               </a>
                          </div>
                            <div class="rightpart">
                                <b>
                                <asp:Label ID="lblTitle" runat="server" Text='<%#Eval("Title")%>' />
                                </b>
                                <br />
                                <asp:Label ID="lblUrl" runat="server" Visible="false" Text='<%#Eval("Url")%>' />
                                 <asp:Label ID="lblUrlValue" runat="server" Visible="false"></asp:Label>
                           </div>
                             
                    </div>
               </div>
            </ItemTemplate>
        </telerik:RadListView>
        </div>
    </form>
</body>


Video Frame

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">
<div style="width: 730px; height: 484px; overflow:hidden; ">
<iframe src="VideoCollection.aspx" style="height: 520px; width: 725px" frameBorder="0" ></iframe>             
</div>
</asp:Content>


I can’t solve this issue..

Also Error like..

"

This content cannot be displayed in a frame

To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.

"

[RESOLVED]how to invoke PagePropertiesChanging event from codebehind like event handler

hello, the below event hadler invoke th btn2 clickevent, when you click btn_click. 

protected void btn_click(object sender, EventArgs e)
{

EventHandler handler = btn2_click; // Where Foo is the event name
if (handler != null)
{
handler (this, e);
}

}

protected void btn2_click(object sender, EventArgs e)
{
Response.Write("hello");
}

likewise, i need to invoke this below event handler. I tried this like above.But It throws an error.

protected void ListView2_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
{

}

i need to invoke that ListView2_PagePropertiesChanging inside the another method of clickevent. like below.

Protected void btn_click(object sender, eventargs e)

{

method1();

}

public void method1()

{

// here i want to invoke that paging event. 

}

help needed.

hi,

you can try  to use the code below:

ListView2_PagePropertiesChanging(null,null); 

i haven’t try the scenario .

why you want to invoke PagePropertiesChanging event from codebehind?

 you are able to declare the event handler directly, then you can call it in other method.

 

thanks for reply. why i need means, i am facing problem after click paging number in datapager control. I mean when i search the data, it filter data and does binding from database listview.databind() the next step(f11) it goes and  binds in aspx page (eval)
to show item on page, this works fine before click paging number in datapager control, but after clicking paging number, when i give search , it does listview.databind() the next step(f11) is not going aspx page( eval ) , inturn it invokes pagepropertieschanging
event. so finally it returns empty. this is the problem.

hi Christxavier,

it does listview.databind() the next step(f11) is not going aspx page( eval ) , inturn it invokes pagepropertieschanging event. 
so finally it returns empty.

i think that you need to rebind the datasource for listview, i would suggest you implement the ListView1_PagePropertiesChanging method:

protected void ListView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
{
    //set current page startindex, max rows and rebind to false
    lvDataPager1.SetPageProperties(e.StartRowIndex, e.MaximumRows, false);

    //rebind List View
    BindListView();
}

please refer to the link for details:

 Paging ListView using DataPager without using DataSource Control

http://weblogs.asp.net/hajan/archive/2011/09/08/paging-listview-using-datapager-without-using-datasource-control.aspx

Hope this was helpful.

 

[RESOLVED]asp.net pagination

i want to inlcude pagination to my webpage below i have included both the aspx page and the cs, could anybody help me out,,i am display videos at the minute but i want to show only 4 videos per page




<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
body
{
font-family: Arial;
font-size: 10pt;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<hr />
<asp:DataList ID="DataList1" Visible="true" runat="server" AutoGenerateColumns="false"
RepeatColumns="1" CellSpacing="5">
<ItemTemplate>
<u>
<%# Eval("Name") %></u>
<hr />
<a class="player" style="height: 300px; width: 300px; display: block" href=’<%# Eval("Id", "FileCS.ashx?Id={0}") %>’>
</a>
</br>
</br>

</ItemTemplate>

</asp:DataList>

<script src="FlowPlayer/flowplayer-3.2.12.min.js" type="text/javascript"></script>
<script type="text/javascript">
flowplayer("a.player", "FlowPlayer/flowplayer-3.2.16.swf", {
plugins: {
pseudo: { url: "FlowPlayer/flowplayer.pseudostreaming-3.2.12.swf" }
},
clip: { provider: ‘pseudo’, autoPlay: false },
});
</script>
</form>
</body>
</html>




using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data.SqlClient;
using System.Configuration;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGrid();
}
}

private void BindGrid()
{
string strConnString = ConfigurationManager.ConnectionStrings["DatabaseConnectionString1"].ConnectionString;
using (SqlConnection con = new SqlConnection(strConnString))
{
using (SqlCommand cmd = new SqlCommand())
{
cmd.CommandText = "select Id, Name from tblFiles";
cmd.Connection = con;
con.Open();
DataList1.DataSource = cmd.ExecuteReader();
DataList1.DataBind();
con.Close();
}
}
}

}

Hi rhinoo,

Thanks for the post.

Based on the code above, I see you used the datalist to show data in your aspx page.

And you you want make a pagination with the datalist control.

For this issue, you can use the LinkButton with Datalist to complete it like below.

http://www.codeproject.com/Tips/457957/Pagination-with-DataList

Besides, I suggest you use the ListView control replace the DataList, ListView can work with the DataPager control.

http://www.codeproject.com/Articles/24065/Paging-ListView-With-DataPager

Hope this helps, thanks.

Best Regards!

 

 

How to fire Repeater Onitemcommand when binded with DataPager?

I’m working with displaying video thumbnails in the repeater control with datapager.
I recently discovered that the onitemcommand of the repeater control won’t fire once
it is being bind with the datapager but if you remove the datapager from binding
the repeater it works.But I want to use the datapager for the repeater cause I want to
set the pagesize in order to display specific number of thumbnails on the repeater.
How do I make the onitemcommand of the repeater to fire using with datapager?

How do I do this in asp.net? Pls help…Thankz.

Directive:

<%@ Register Assembly ="DataPagerRepeater" Namespace ="DataPagerRepeater" TagPrefix ="vid"  %>

Here’s my HTML source tag of the repeater control with DataPager:

<vid:DataPagerRepeater ID="Repeater1" runat="server" 
                        DataSourceID="SqlDataSource1" onitemcommand="Repeater1_ItemCommand">
                  
                   <HeaderTemplate >
                   <table border ="0" style ="width :350px;" >
                   </HeaderTemplate>
                   
                   <ItemTemplate >
                   <tr>
                   <td style ="border :0px; height :100px; width :350px">
                   <asp:ImageButton ID ="thumb" runat ="server"  style=" margin-right :5px" Width ="120px" Height ="75px" ImageAlign = "Left"  ImageUrl='<%#Eval("Filename","~/Thumbs/{0}") %>' />
                   <asp:Label ID="title" runat ="server"  Text ='<%#Eval("Title") %>' />
                   <br />
                   <asp:Label ID ="artist" runat ="server"  Text ='<%#Eval("Artist") %>' />
                   <br />
                    <asp:Label ID ="view" runat ="server"   Text ='<%#Eval("Views") %> '  />
                  <asp:Label ID ="Label3" runat ="server" Text =" Views" /> 
                    <br />
                   <%--  <asp:Label ID ="fname" runat ="server"  Text ='<%#Eval("VidFname") %>' /> --%>
                   <asp:TextBox ID ="fname" runat ="server"  Text ='<%#Eval("VidFname") %>' />
                     </td>
                     
                      </tr>
                                 
                   </ItemTemplate>
                   
                   <%--  
                   <AlternatingItemTemplate >
                   <tr>
                   <td style ="border :0px; height :100px; width :140px">
                    <asp:ImageButton ID ="thumb2" runat ="server" style=" margin-right :5px" Width ="120px" Height ="75px" ImageAlign ="Left" ImageUrl ='<%#Eval("Filename","~/Thumbs/{0}") %>' />
                   <asp:Label ID="title2" runat ="server" Text ='<%#Eval("Title") %>' />
                   <asp:Label ID ="artist2" runat ="server"  style="margin-left :20px" Text ='<%#Eval("Artist") %>' />
                   <asp:Label ID ="view2" runat ="server"  style="margin-left :20px" Text ='<%#Eval("Views") %> ' />
                  <!-- <asp:Label ID ="Label4" runat ="server" Text =" Views" /> -->
                   
                   </td>
                   
                      </tr>
                         
                   </AlternatingItemTemplate>
                  --%>
                  
                   <SeparatorTemplate >
                   <br />
                   </SeparatorTemplate>
                   <FooterTemplate >
                   </table>
                   </FooterTemplate>
                   
</vid:DataPagerRepeater>


<asp:DataPager ID="DataPager1" runat="server" PagedControlID="Repeater1" PageSize="10">
                   <Fields>

          <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />

          <asp:NumericPagerField />

          <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />

                 </Fields> 
</asp:DataPager>

First, where is the DataPagerRepeater class coming from? Is it this one?

http://www.codeproject.com/Articles/45163/Extend-Repeater-to-support-DataPager

Second, why not just roll your own datapager and limit the rows returned by the query. You don’t have to ever worry about messing with the repeater control since all you are doing is re-binding it to updated data.

markfitzme

First, where is the DataPagerRepeater class coming from? Is it this one?

http://www.codeproject.com/Articles/45163/Extend-Repeater-to-support-DataPager

Second, why not just roll your own datapager and limit the rows returned by the query. You don’t have to ever worry about messing with the repeater control since all you are doing is re-binding it to updated data.

Yes, first thats where I got the basis to use the datapager on the repeater.

On your second suggestion to roll my own datapager and limit the rows returned by the query, problem is I’m not sure how to 

do that since I’m new to using datapager control with repeater. How do I this? Can u pls guide me more?

I tried something like this on my HTLM source tag removing the datapager directives

<asp:Repeater ID="Repeater1" runat="server"
                        DataSourceID="SqlDataSource1" onitemcommand="Repeater1_ItemCommand">
                  
                   <HeaderTemplate >
                   <table border ="0" style ="width :350px;" >
                   </HeaderTemplate>
                   
                   <ItemTemplate >
                   <tr>
                   <td style ="border :0px; height :100px; width :350px">
                   <asp:ImageButton ID ="thumb" runat ="server"  style=" margin-right :5px" Width ="120px" Height ="75px" ImageAlign = "Left"  ImageUrl='<%#Eval("Filename","~/Thumbs/{0}") %>' />
                   <asp:Label ID="title" runat ="server"  Text ='<%#Eval("Title") %>' />
                   <br />
                   <asp:Label ID ="artist" runat ="server"  Text ='<%#Eval("Artist") %>' />
                   <br />
                    <asp:Label ID ="view" runat ="server"   Text ='<%#Eval("Views") %> '  />
                  <asp:Label ID ="Label3" runat ="server" Text =" Views" />
                    <br />
                   <%--  <asp:Label ID ="fname" runat ="server"  Text ='<%#Eval("VidFname") %>' /> --%>
                   <asp:TextBox ID ="fname" runat ="server"  Text ='<%#Eval("VidFname") %>' />
                     </td>
                     
                      </tr>
                                 
                   </ItemTemplate>
                   
                   <%--
                   <AlternatingItemTemplate >
                   <tr>
                   <td style ="border :0px; height :100px; width :140px">
                    <asp:ImageButton ID ="thumb2" runat ="server" style=" margin-right :5px" Width ="120px" Height ="75px" ImageAlign ="Left" ImageUrl ='<%#Eval("Filename","~/Thumbs/{0}") %>' />
                   <asp:Label ID="title2" runat ="server" Text ='<%#Eval("Title") %>' />
                   <asp:Label ID ="artist2" runat ="server"  style="margin-left :20px" Text ='<%#Eval("Artist") %>' />
                   <asp:Label ID ="view2" runat ="server"  style="margin-left :20px" Text ='<%#Eval("Views") %> ' />
                  <!-- <asp:Label ID ="Label4" runat ="server" Text =" Views" /> -->
                   
                   </td>
                   
                      </tr>
                         
                   </AlternatingItemTemplate>
                  --%>
                  
                   <SeparatorTemplate >
                   <br />
                   </SeparatorTemplate>
                   <FooterTemplate >
                   </table>
                   </FooterTemplate>
                   
                    </asp:Repeater>

<asp:SqlDataSource ID="SqlDataSource1" runat="server"
                        ConnectionString="<%$ ConnectionStrings:VideosConnectionString2 %>"
                        SelectCommand="SELECT * FROM [VidTab] ORDER BY [ID] DESC">
</asp:SqlDataSource>

<asp:DataPager ID="DataPager1" runat="server" PagedControlID="Repeater1" PageSize="10">
                   <Fields>

          <asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />

          <asp:NumericPagerField />

          <asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="True" ShowNextPageButton="False" ShowPreviousPageButton="False" />

                 </Fields>
</asp:DataPager>

but I encountered a runtime error when the page loads and displays

Control ‘Repeater1′ does not implement IPageableItemContainer.

What codes am I still missing? How do I fix this? Can u give a sample to do this on using repeater with datapager?

I greatly appreciate your help on this. Thankz