Click here to Skip to main content
15,920,438 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: JavaScript Quesiton Pin
Krazy Programmer13-Jun-08 1:44
Krazy Programmer13-Jun-08 1:44 
GeneralRe: JavaScript Quesiton Pin
eyeseetee13-Jun-08 2:25
eyeseetee13-Jun-08 2:25 
GeneralRe: JavaScript Quesiton Pin
Krazy Programmer13-Jun-08 6:13
Krazy Programmer13-Jun-08 6:13 
Questionasp.net role manager Pin
eyeseetee12-Jun-08 23:48
eyeseetee12-Jun-08 23:48 
QuestionIs there a control in Visual Studio similar to the wizard control? [modified] Pin
Nada Adel12-Jun-08 23:45
Nada Adel12-Jun-08 23:45 
QuestionWant to display items from database and also to enter values Pin
dsaikrishna12-Jun-08 23:42
dsaikrishna12-Jun-08 23:42 
AnswerRe: Want to display items from database and also to enter values Pin
eyeseetee12-Jun-08 23:49
eyeseetee12-Jun-08 23:49 
QuestionDropdownlist in Pager Template Pin
Wasif Ehsan12-Jun-08 23:10
Wasif Ehsan12-Jun-08 23:10 
Hi,
I need to use a Dropdownlist in the PagerTemplate of the gridview. The dropdownlist contains
all the page numbers. When I select a different page number from the dropdownlist, the grid must move to
the selected page. My gridview looks like this:

<pre> <asp:gridview id="grdProds">
runat="server"
Width="100%"
EmptyDataText="No product(s) found."
PageSize="5"
AllowPaging="true"
PagerSettings-NextPageText="Next"
PagerSettings-PreviousPageText="Previous"
PagerSettings-Mode="NextPrevious"
PagerSettings-Position="Bottom"
PagerStyle-CssClass="HyperLinkStyle1"
CssClass="Grid"
ShowHeader="False"
BorderStyle="None"
GridLines="None"
ShowFooter="true"
AutoGenerateColumns="False"
OnPageIndexChanging="grdProds_PageIndexChanging" OnDataBound="grdProds_DataBound" OnRowDataBound="grdProds_RowDataBound" &gt;
<columns>
<asp:templatefield>
<itemtemplate>
<asp:hyperlink id="hLink" runat="server" navigateurl=""><![CDATA[<%# Eval("Category_Id", "~/Products.aspx?CatID={0}") %>]]>'
Text='&lt;%# Eval("Product_Name") %&gt;' CssClass="HyperLinkStyle1"&gt;</asp:hyperlink>
<br />

<asp:label id="lblDesc" text=""><![CDATA[<%# Eval("Product_Short_Description") %>]]>' runat="server" CssClass="SCTextLarge" /&gt;

<br />
<br />
<span id="spPrice" runat="server">
<b>Price:</b>&nbsp;
<asp:label>
ID="lblPrice"
runat="server"
Text='&lt;%# Eval("Product_Price","{0:C2}") %&gt;'
CssClass="SCText"
/&gt;
<br />
<b>Qty:</b>&nbsp;&nbsp;&nbsp;
<asp:textbox>
id="txtQty"
runat="server"
MaxLength="4"
Width="15%"
Text="1"
/&gt;
<asp:comparevalidator>
ID="comQty"
runat="server"
ControlToValidate="txtQty"
Type="Integer"
Operator="dataTypeCheck"
ErrorMessage="*"
SetFocusOnError="true"
/&gt;
<asp:requiredfieldvalidator>
ID="reqQty"
runat="server"
ControlToValidate="txtQty"
ErrorMessage="*"
SetFocusOnError="true"
/&gt;
&nbsp;&nbsp;
<asp:button>
id="btnAddToCart"
runat="server"
Text="Add"
CommandName="Add"
CommandArgument='&lt;%# Eval("Product_ID")%&gt;'
OnCommand="OnCommand"
CssClass="SearchButtonStyle"
/&gt;

</asp:button></asp:requiredfieldvalidator></asp:comparevalidator></asp:textbox></asp:label></span>

</asp:label></itemtemplate>
<itemstyle cssclass="GridItem" />
</asp:templatefield>
<asp:templatefield>
<itemtemplate>
<a href=""><![CDATA[<%# SetUrl(Eval("Category_Id"),Eval("Product_Id")) %>]]>' &gt;
<asp:image id="img" runat="server" imageurl=""><![CDATA[<%# GetImageUrl(Eval("product_image_tn_path")) %>]]>' AlternateText="Image not available" /&gt;
</asp:image></a>
</itemtemplate>
<itemstyle cssclass="GridImage" />

</asp:templatefield>

</columns>

<pagertemplate>
<table width="100%">
<tr>
<td style="width:70%;">
<center>
<asp:button>
ID="btnPrev"
runat="server"
CommandName="Page"
CommandArgument="Prev"
OnCommand="OnCommand"
CssClass="PagerButton"
Text="Previous"
/&gt;
<asp:dropdownlist>
id="drpPager"
runat="server"
AutoPostBack="true"
OnSelectedIndexChanged="drpPager_SelectedIndexChanged"
Width="10%"
/&gt;
<asp:button>
ID="btnNext"
runat="server"
CommandName="Page"
CommandArgument="Next"
OnCommand="OnCommand"
CssClass="PagerButton"
Text="Next"
onmouseover="this.style.font-weight='bold';"
/&gt;
</asp:button></asp:dropdownlist></asp:button></center>
</td>

<td style="width:30%;">
<asp:label>
id="lblProdsView"
runat="server"
CssClass="PagerText"
/&gt;
</asp:label></td>
</tr>
</table>
</pagertemplate>
<pagersettings mode="NextPrevious" nextpagetext="Next" previouspagetext="Previous" />
<pagerstyle cssclass="HyperLinkStyle1" />
</asp:gridview></pre>

I am setting the grid to the newly selected page in the selectedIndexChanged event of the dropdownlist.
Now when I choose a different page from the drop downlist, the page posts back but the drop downlists SelectedIndexChange event does
not fire.

Can anybody tell me the reason and/or work around. My Intention is to use dropdownlist in the
Pager. If anybody has any other code, please send it to me.

Regards,
Wasif.
QuestionContext Menu in List box Item in ASP.Net using C# Pin
Manikkuttan12-Jun-08 23:01
Manikkuttan12-Jun-08 23:01 
AnswerRe: Context Menu in List box Item in ASP.Net using C# Pin
eyeseetee12-Jun-08 23:35
eyeseetee12-Jun-08 23:35 
GeneralRe: Context Menu in List box Item in ASP.Net using C# Pin
Manikkuttan13-Jun-08 0:05
Manikkuttan13-Jun-08 0:05 
Questionpop up window Pin
deepthy.p.m12-Jun-08 23:01
deepthy.p.m12-Jun-08 23:01 
AnswerRe: pop up window Pin
eyeseetee12-Jun-08 23:33
eyeseetee12-Jun-08 23:33 
AnswerRe: pop up window Pin
deepthy.p.m12-Jun-08 23:40
deepthy.p.m12-Jun-08 23:40 
GeneralRe: pop up window Pin
eyeseetee12-Jun-08 23:52
eyeseetee12-Jun-08 23:52 
QuestionRe: pop up window Pin
Krazy Programmer12-Jun-08 23:59
Krazy Programmer12-Jun-08 23:59 
AnswerRe: pop up window Pin
eyeseetee13-Jun-08 0:09
eyeseetee13-Jun-08 0:09 
AnswerRe: pop up window Pin
Ashfield13-Jun-08 0:30
Ashfield13-Jun-08 0:30 
Questionhow to search internet from Web Application? Pin
King Shez12-Jun-08 20:47
King Shez12-Jun-08 20:47 
AnswerRe: how to search internet from Web Application? Pin
eyeseetee12-Jun-08 21:31
eyeseetee12-Jun-08 21:31 
QuestionFile upload control with update panel ? Pin
Masood Kochi,SSF12-Jun-08 20:39
Masood Kochi,SSF12-Jun-08 20:39 
AnswerRe: File upload control with update panel ? Pin
eyeseetee12-Jun-08 21:32
eyeseetee12-Jun-08 21:32 
GeneralRe: File upload control with update panel ! Brief ? Pin
Masood Kochi,SSF12-Jun-08 22:47
Masood Kochi,SSF12-Jun-08 22:47 
GeneralRe: File upload control with update panel ! Brief ? Pin
eyeseetee12-Jun-08 23:37
eyeseetee12-Jun-08 23:37 
QuestionSending sms to mobile from asp.net without payment is possible ? Pin
Masood Kochi,SSF12-Jun-08 19:48
Masood Kochi,SSF12-Jun-08 19:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.