|
You need to bind the grid again after changing the page number
|
|
|
|
|
I do like this
Private Sub dgResources_PageIndexChanged(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles dgResources.PageIndexChanged
dgResources.CurrentPageIndex = e.NewPageIndex
dgResources.DataBind()
End Sub
But is not maintaing its state.
Bye the way I am using this code to check whether the check box is checke / uncheked.Even the checkbox is check it is giving the value Checked = False always
For i = 0 To dgResources.Items.Count - 1
chk = (dgResources.Items(i).Cells(0).FindControl("chkResource_First"))
If Not chk Is Nothing Then
If chk.Checked = True Then ' Always false.
'Do some thing
End If
Else
End If
Next
|
|
|
|
|
danasegaranea wrote: dgResources.CurrentPageIndex = e.NewPageIndex
dgResources.DataBind()
You are not setting the data source.
|
|
|
|
|
Hi all,
How can I get all the rows/columns of a datagridview in VS 2003.
Thanks
Dana
|
|
|
|
|
What is the problem you are having in looping through the rows or columns of the datagrid. You can always get the row or count of the datagrid and then loop through with that.
Apurva Kaushal
|
|
|
|
|
there are nearly 10 items in the dropdown list now how can i make the 2,4,6,8 items to disable not to view to the user
|
|
|
|
|
Isn't this the same as your previous question. Anyway, the answer is the same. It can't be done.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Why don't remove these items you want to disable ?
imagic
|
|
|
|
|
hi
can any one help me in creating website in hindi and english language it is reallly urgent
|
|
|
|
|
You might want to have a look at the use of resource files in asp.net.
|
|
|
|
|
iam having a dropdown list where iam having the items..but some items are to be hide so that user cannot select that list item...but the index of the item should not change
|
|
|
|
|
You can't hide dropdownlist items. You should only populate the control with items that the user has permission to select.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
|
i Got it!!
function OnClickHandler()
{
var anchors = document.getElementsByTagName('A');
for(var i=0;i<anchors.length;i++)>
{
var anchor = anchors[i];
}
}
|
|
|
|
|
hi friends Good Morning
how to open Dialog box in asp.net?
Piyush Vardhan Singh
|
|
|
|
|
You can do this in JavaScript. Use the window.alert() method.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Hi,
I want to be able to open a new e-mail message with the recipients filled in. Currently I'm doing this by using a "mailto:a;b;c;d;etc;" link which I build up dynamically. However, when this exceeds 4096 characters the link just stops, which is understandable since that is probably the maximum amount it can take. Building an entire mail form using the .NET mail object isn't an option though.
Basically the need I have is just a simple way to open up an empty e-mail in the user's standard e-mail client with recipients dynamically filled in (preferably BCC ofcourse). Is there any way to go about that without running into size restrictions when the amount of recipients is quite big?
Cheers,
-Manny
|
|
|
|
|
I know this should be possible
I have a dropdownlist. In it I have the name of multiple .aspx pages
I want my user to select a page and have that page open. I also would like to pass 2 variables to the page they opened to be used in a query statement eg CustID and dateofpurchase. These are located in the page with the dropdownlist (source Page) as text in 2 textboxes hidden. I am looking for a code in the dropdown selected event that could open the page and pass these into the target page. PLEASE I WOULD BE MOST GREAT FULL. I am using VB with asp.net. I have tried both response.redirect, server.transfare and even coded the source page into the target page with little success because I do not know the correct syntax.
modified on Wednesday, January 16, 2008 10:31:44 PM
|
|
|
|
|
Fine I will Just answer it myself. Make the dropdownlist, The id of your list item is the name of the page (ie .aspx). The text is the name you want to show in the list. Now since the page with the dropdownlist is the main page use all the other pages to obtain the controll that you want using the ctype(previouspage.find controll),textbox). There you have it when you select an item the correct page opens and has the controll info you need. As for me I use this to open each system to allow my users to change the systems using the information on two controlls in the main page. The controlls Identify the owner of those systems. Hope it helps someone else.
|
|
|
|
|
Fine I will Just answer it myself. Make the dropdownlist, The id of your list item is the name of the page (ie .aspx). The text is the name you want to show in the list. Now since the page with the dropdownlist is the main page use all the other pages to obtain the controll that you want using the ctype(previouspage.find controll),textbox). There you have it when you select an item the correct page opens and has the controll info you need. As for me I use this to open each system to allow my users to change the systems using the information on two controlls in the main page. The controlls Identify the owner of those systems. Hope it helps someone else. Let me know what you think
|
|
|
|
|
hi
i use forms authentication for web application in asp 2
but in some systems with win xp os
users cant loged in to systems and redirect to login page with out login errors
note: in this systems cookies is on
please help me
|
|
|
|
|
what is the login error users get?
Best Regards,
Sam Xavier
www.componentone.com
|
|
|
|
|
no error message and no nothing only redirect to login page
thanks
|
|
|
|
|
I have created a login system and put the restricted page in folder. using asp.net configuration => Security tab (Visual Studio 2005) i have allowed access to only users. Ananymous users should not be able to view that page. However it doesnt let me view that page at all. i get the following error:The resource cannot be found. does any one have any ideas where i may have gone wrong. I hope th edescription of the problem is clear
|
|
|
|
|
Hi there,
I have 1 Label (message), 2 Buttons (AddButton and RemoveButton) and 1 Textbox. When someone enters him/her e-mail to the Textbox:
if AddButton is clicked
E-mail address is adding to the database and Label gets value "You have added successfully"
if RemoveButton is clicked
E-mail address is removing from the database and Label gets value "You have removed successfully"
While Adding or Removing operation is processing
UpdateProgress writes "Processing..."
Everything works fine at the first adding and removing. If I repeat adding or removing without leaving web page, Label remains with exists value and when the operation is done (removing or addind), Label gets correct value. Sounds not bad but I want to set Label value to null while Processing. I wirte a line at the beginning of AddButton_Click and RemoveButton_Click but nothing changed...
The following codes are in the .aspx page:
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<font size="3" color="#008800">Processing...</font>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<asp:Label ID="message" runat="server"></asp:Label>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="AddButton" EventName="Click" />
<asp:AsyncPostBackTrigger ControlID="RemoveButton" EventName="Click" />
</Triggers>
</asp:UpdatePanel>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="mailtxt"
ErrorMessage="Not proper e-mail address" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator><div class="search_field">
<div class="search_form">
<asp:TextBox ID="mailtxt" class="search" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="mailtxt"
ErrorMessage="***" Font-Bold="True" Font-Size="Medium"></asp:RequiredFieldValidator><br /><br />
<asp:Button ID="AddButton" class="submit" runat="server" OnClick="AddButton_Click" Text="Add" />
<asp:Button ID="RemoveButton" class="submit" runat="server" Text="Remove" OnClick="RemoveButton_Click" /><br />
The following codes are in .aspx.cs file:
protected void AddButton_Click(object sender, EventArgs e)
{
message.Text = ""; //or message.Text=string.Empty;
...........................
}
protected void RemoveButton_Click(object sender, EventArgs e)
{
message.Text = "";
...........................
}
Do you have any idea about what should I do?
Thanks a lot...
|
|
|
|