|
uglyeyes wrote: Dim item As DataListItem
You may want to declare this object as RepeaterItem instead of the DataListItem.
|
|
|
|
|
Hi Its working fine.
but how will i let user only select one checkboxItem within checkboxlist within a repeater.
I know radiobuttonlist will be a good option but again. once the user selects a radiobuttonitem within a repeater they cant actually uncheck it.
please help.
|
|
|
|
|
You'll have many ways to check if the user select one or more items:
+ Use the server side code to count the number of the selected checkboxes in the Items collection.
+ Use javascript to validate if the user chooses more than 2 items, you can use a custom validator in this case.
+ Simply persist the current number of the selected checkboxes in a hidden textbox using javascript, and use the CompareValidator to validate the textbox.
+ Keep using the radiobuttonlist, but may consider adding another checkbox and place it right at the beggining of the category name to give the user an option to not choose any item.
It's weird when getting voted down with all 1s
|
|
|
|
|
Hi all
Can any one send me the example for Threading. Because i need to use threading concept in my app. Thanks in advance
Thanks and Regards
Venkat
|
|
|
|
|
Try doing a search on this site or elsewhere. Threading is a common knowledge area, you should find plenty of examples. Be warned though, you may actually have to do some reserch, thinking and work on your own.
|
|
|
|
|
Hi
In asp.net 1.1 datagrid, i have one template column in that i have link. for that link i am passing command arguments like this
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "id1")%>'
I want to pass multiple values(id1, id2) through command argument. how to pass.
can anyone tell syntax for this
awaiting for reply
regards
GV Ramana
|
|
|
|
|
I think you have to do a delimited string and parse it out in the event handler. IE:
<br />
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "id1") + "|" + DataBinder.Eval(Container.DataItem, "id2")%>'<br />
Dirk Watkins
|
|
|
|
|
Hi Developers
I have performed two way sorting on Datagrid and its working very smoothly(When we first click on header of any column, grid wil b sorted in Acsending Order and when we clcik second time on column header, grid will be sorted in descending order).
Now what I need is that there should be two Arrows Up/Down with each header of Datagrid, Now if we click on Down Arrow the Grid should be sort in Descending Order and When we click on Up Arrow datagrid should be sorted in Ascending Order.
Thanks in advance
Lets work it Out.........!
-- modified at 7:36 Tuesday 11th July, 2006
|
|
|
|
|
Hi you can use Headertemplate to add ImageButton with default ImageUrl=Uparrow.
then on Item command you do sorting functon also add the Current- sort critria in viewstate
Then OnItemDataBound event find sorting ImageButton in ListItemType.Header and bases on the Current- sort critria in viewstate change the imageUrl property of ImageButton
Nobody is perfect i'm Nobody
|
|
|
|
|
Thanks for your reply BUT this all I have done, I need to have two Arrow Buttons with each Column Header and when user click on Up Arrow grid should be sorted in Ascending order and vice versa. I hope its clear now...
Lets work it Out.........!
|
|
|
|
|
Hi friends,
I am told to convert all the response which is coming from server which is in aspx format to html format and then display. the purpose of doing like this is to increase the browsing speed. All the link in the web page is linked to their respective .html files. Can anyone tell me how to do this.
Thanks in advance
Vipin
|
|
|
|
|
??
When you run as aspx page, what it returns to the browser is just html (as it has to be). The only thing that you would really be changing would be the page extension...
Why?
|
|
|
|
|
If you want to speed up the site there are other steps you can take. Try reading "Speed Up Your Site" by these guys: http://www.websiteoptimization.com/speed/. This book is really good even though it is a couple years old. It's worth the read.
In .net you can disable viewstates if your are not using them and try to keep your control IDs shorter. The less characters that are sent to the client the faster the site will be.
Although, if your .aspx pages are NOT "doing" anything then static HTML pages would be faster as it won't have to process any code server side.
Dirk Watkins
|
|
|
|
|
Hi,
I know its possible to provide security for ASP.NET webservice through Security settings provided by IIS. But I would like to know how to secure each individual [WebMethods] methods requset that arrive from disparate client.
Mohan P
|
|
|
|
|
i am working on web application in which we are using Outproc session mgt.
As we manage session using Outproc there are two ways
1) Sql Server
2) State Server
in above we are using State session mgt.
In this case i want to know if we use Application variable then where actually this variable store on Web Server OR State Server.
Please tell me ... our further development depend on this ....
Thanx in Advance
|
|
|
|
|
Well Session object are different than application object so in any case application object will not be there on IIS reset or application stop only the session variables will remain
Nobody is perfect i'm Nobody
|
|
|
|
|
Thanx for Reply
i am not able to understand ... what u want to say ???
Pls explain me ... If you have any urls regarding this issue pls send me.
It will be helpful ...
|
|
|
|
|
Hi all I am using following code to bind data with dropdown list
<asp:DropDownList ID="ddPCBackSide" runat="server" Width="150px" DataSourceID="PCBackSideSourceProductFields"
DataTextField="field_defaultvalue" DataValueField="field_defaultvalue">
</asp:DropDownList>
<asp:SqlDataSource ID="PCBackSideSourceProductFields" runat="server" ConnectionString="<%$ ConnectionStrings:sConnectionString %>"
SelectCommand="SELECT field_defaultvalue FROM cp_productfields WHERE field_product_id='Convert.ToInt32(Session["ProductId"])', field_type='DropDownList', field_ID='ddPCBackSide'"
ProviderName="<%$ ConnectionStrings:sConnectionString.ProviderName %>"></asp:SqlDataSource>
I am getting following error during compilation
Error 1 Type 'System.Web.UI.WebControls.SqlDataSource' does not have a public property named 'field_defaultvalue'.
Is there anything wrong in the syntax? Pls let me know.
|
|
|
|
|
Try changing the double quotes to single quotes. I haven't looked closely at this but first guess is that is causing the problem.
|
|
|
|
|
SQL query parameters are in single quote.
|
|
|
|
|
'" & Convert.ToInt32(Session["ProductId"]) & "', field_type='" & DropDownList & "', field_ID='" & ddPCBackSide & "'"
try by using this
hi to all
with regards,
susa
|
|
|
|
|
Can we use static variables to maintain state in ASP.Net Application in place of storing at Application Object? What are merits/demerits
Abhinav
|
|
|
|
|
In traditional ASP, we always had the Application object to store application-wide variables in. This of course came at the price of memory allocations. In .NET we can now take advantage of Static Variables, which in most cases can be faster than accessing the Application object.
In .NET, most objects are actually classes, and Global.asax is no exception. To take advantage of this, we first have to give our Global.asax a Classname. We do this by adding the directive naming mine 'MyGlobals':
<%@ Application Classname="MyGlobals" %>
Then, we specify our Static Variable inside the script tags, using the 'Public' and 'Shared' keywords in the Global.asax:
VB:
Public Shared sGreeting as String = "Visit HarrisonLogic.com!"
C#:
Public Static String sGreeting = "Visit HarrisonLogic.com!"
Now that we have the variable 'sGreeting' set up, we can call it directly from our .aspx page using the Class name and the Variable name:
x = MyGlobals.sGreeting
But in case of at some sitiations you may need to acces certain data with respect to the applications like storing number of hit counts for the application.
Major differences
------------------
1) Static variables cannot persist its value after server post backs.
2) But Application object will persist its value after server post backs
Regards
Mohan P
|
|
|
|
|
i would like to create a .aspx page prgramaticlly in asp.net.
dolly
|
|
|
|
|
Self modifying code is very rarely needed in programming.
What is it that you think would be best solved using this?
---
b { font-weight: normal; }
|
|
|
|