|
When you say 'the problem occurs here', what does the debugger tell you ? Is the list you check against empty ? Are the Ids changing ? What's causing the test to fail ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
HI .thanks for your reply.. It is taking the boolean true... But it is not displaying on the page.. as checked
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
if (CheckedIndex.Contains(index))
{
CheckBox CheckItem = ((CheckBox)row.FindControl("chkDataSave"));
CheckItem.Checked = true;
// CheckItem.Visible = true;
//lbl_test.Text = CheckItem.Text;
// Response.Write(CheckItem.Text);
}
So, the control is found, it's checked property is set to true, but it's not checked ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
So, the control is found, it's checked property is set to true, but it's not checked ?
Yes the above is true..
Please let me know how to solve it.
Thank you ,
Warm Regards,
Nikhil Pagidala
Happy Programming!
Regards,
Nikhil Pagidala
|
|
|
|
|
Hi,
I have one default.aspx page and many .ascx user controls that are displayed inside default.aspx page. There is always only one .ascx user control in the default page (placeholder) at one time. This page is added dynamicly in Page_Load of the default.aspx :
protected void Page_Load(object sender, EventArgs e)
{
this.LoadContent();
}
public void LoadContent()
{
this.placeholderContent.Controls.Clear();
this.placeholderContent.Controls.Add(this.LoadControl([...some mechanism how to get right file...]));
}
during Page_Load of currently loaded user control, it might happen that depending on user action this control requires to be changed to different .ascx user control , so LoadContent (in default.aspx ) is called to dump current control and load new one.
Problem occurs that when a new control is loaded after an old control was dumped, events (button clicks) of new added control are not registred properly. When a button on new control is clicked, it doesn't invoke the registered event during next postback. Event's start working from second postback on... (if the user control doesn't change)
thanx for help!
zilo
|
|
|
|
|
I thnk Page Load is too late to do this, you need to do it in the loadviewstate event for events to fire properly.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
thanx for answer, I'll try that.
zilo
|
|
|
|
|
Hi,
when adding controls to my placeholder in loadviewstate , they are not displayed at all
zilo
|
|
|
|
|
You have to use the LoadControl method of the page class.
This way, the "state" of the user control reflects the "state" of the page.
For more information search with google for "dynamically add usercontrol asp.net"
-^-^-^-^-^-^-^-^-^-^-^-
no code is free of bugs
|
|
|
|
|
That's what I do - use LoadControl of the Page class.
I'll try google that link.
thank you
zilo
|
|
|
|
|
Hi,
I've seen many tutorials and they all have one thing in common. They are very simple and do not cover this problematics deeply enough. I did not learn anything new. I would appreciate your help if you have any experience in dynamic loading and changing user controls.
thanx
zilo
|
|
|
|
|
Move it from Page_Load to Page_OnInit and hopefully that should fix your problem.
|
|
|
|
|
It did not help.
It behaves same way as when in Page_Load
zilo
|
|
|
|
|
Hey all,
I have the need to write a small web app that will bulk insert data in mysql. For example, let's say I have a couple of combo boxes and text boxes. The selections that the user makes in the combo boxes need to appear on each inserted row. The text boxes will contain specific data that require their own rows. This will be a listing of financial accounts, and the user will enter in the account numbers and the amount. The page will have something like 20 different rows of text boxes for each account that need to be filled in at the same time. So picture this like a spreadsheet of text boxes where the user needs to enter specific information in each box that needs its own row in the database, because each row will have the combo box information and timestamp for auditing purposes.
My big question is how to go about doing this with xml. I'm pretty that sure this would be the best way unless you guys have something else. I have read a lot of resources on using xml with bulk insert, but I need this in vb.net. That documentation has been hard to come by.
Could someone point me in the right direction?
Thanks all!
|
|
|
|
|
Hi All,
I have a user web page Asp.Net under vb.Net this page for users via live page, the user should insert his E-Mail in text Box and press the Enter Button to Answer The Question(s) of form appears Randomly Each time he entered His Email. The Form containig Question or more and a probable RadioButton Answers,I need to Know How I make a Random Form. You Should know I make a DropDownList Containing The Text of Question and The Answer in Radio Button filtered by Database in Server Page. Plz Some Help or Notes.
Regards
Mr.Wonderful
Programmer
|
|
|
|
|
You'd have a data base that reads random questions, the page would just take them and show them
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have two textboxes and one label. In textboxes I am entering numbers. To those textboxes I assigned on javascript function which will calculate the difference of those numbers and display in the label. I have one radio button. I need to disable the radio button if the difference is negative.
How to diable the radio button based on label value. I am assigning the difference to label in javascript function.
Thanks
|
|
|
|
|
If you are already using Javascript to assign the label, then it should be easy set the radio button appropriately.
if(value < 0)
radiobtn.checked = false
only two letters away from being an asset
|
|
|
|
|
Hi interested,
I have 2 small web pages using ASP.Net under VB.Net code, the first containing DropDownList containing countries filtering into it, when I select one of the countries it should filter cities of this selected Country into other DropDownList in the Second web page, I need to know How to do this, Plz some Help using just few codes no need to wizard.
Mr.Wonderful
Programmer
modified on Thursday, January 03, 2008 12:13:41 PM
|
|
|
|
|
Hi to all. I've been trying to find a way of resolving a problem I have and I can't quite figure it out how to do it.
I would like to achieve the following: I want to be able to list the directories (and subdirectories) of the hard drive of an user local machine, when he access a web page, displayed in a treeview, like a kind of XP File Explorer.
Is this possible, at all? If it is, how can I achieve this? Can I make this using "regular" asp.net, or "hell no!"? I'm asking this because I really can't seem to understand how I could list the folders of the client hardrive. For example, I can't run a command like this
Dim drives As String() = Directory.GetLogicalDrives()
in a way that it lists the drives of the PC of the client that is accessing the webpage, can I?
If this can't be done by "regular" code, how could I do it? ActiveX? Ajax? I haven't worked with any of these technologies so I'm really just wondering here...
At this point I don't even care if I can already put the directories in a treeview or not... I would just be happy to know a way to just print the list of directories.
I would appreciate if somebody could please direct me to a direction, an article or something that would enlighten me on what and how to do this.
Thanks in advance.
TechnoSpike
modified on Thursday, January 03, 2008 12:25:09 PM
|
|
|
|
|
TechnoSpike wrote: Is this possible, at all? If it is, how can I achieve this? Can I make this using "regular" asp.net, or "hell no!"?
You would need to create some kind of ActiveX control. The user would then need to install it, which means they would have to trust you.
TechnoSpike wrote: For example, I can't run a command like this
Dim drives As String() = Directory.GetLogicalDrives()
in a way that it lists the drives of the PC of the client that is accessing the webpage, can I?
That isn't possible. It will return the details of the server drives, not the client drives. (Hopefully, for the obvious reason that it is running on the server)
TechnoSpike wrote: If this can't be done by "regular" code, how could I do it? ActiveX? Ajax? I haven't worked with any of these technologies so I'm really just wondering here...
It depends what you mean by "reglar" code. You create an ActiveX control in "regular" code - There is nothing all that special to it. Did you mean ".NET" code?
Ajax runs in a sandbox in order to protect the computer it is running on, so it would not have access to such information.
ActiveX doesn't have a good security model so it can access that kind of information. Although you still have to persuade the user to install the ActiveX controls in the first place.
TechnoSpike wrote: I would appreciate if somebody could please direct me to a direction, an article or something that would enlighten me on what and how to do this.
Unfortunately I can't. It has been about 10 years since I last created an ActiveX control (in C++).
|
|
|
|
|
Colin Angus Mackay wrote: It depends what you mean by "reglar" code. You create an ActiveX control in "regular" code - There is nothing all that special to it. Did you mean ".NET" code?
When I said "regular" code I was trying to say a a way to achieve what I want in an identical way as I would do it if I wanted to list the directories of the server (just plain asp.net, not using ActiveX or other thing).
Colin Angus Mackay wrote: Ajax runs in a sandbox in order to protect the computer it is running on, so it would not have access to such information.
So, Ajax is the same boat as Javascript, then (so to speak)? Meaning, there's no way I can list the directories of the hard drive of the machine the client is using to access my webpage using Ajax or Javascript, or anything else?
The only way of listing the contents of the client harddrive will be to have something that has to be installed in his machine to execute that command, is that it?
|
|
|
|
|
TechnoSpike wrote: So, Ajax is the same boat as Javascript, then (so to speak)?
Well, yes. The J in Ajax stands for Javascript.
TechnoSpike wrote: The only way of listing the contents of the client harddrive will be to have something that has to be installed in his machine to execute that command, is that it?
Yes, it needs to be able to get out of the sandbox. There isn't much that can do that becase it can compromise the security of the machine so it is generally frowned upon.
|
|
|
|
|
Colin Angus Mackay wrote: Yes, it needs to be able to get out of the sandbox. There isn't much that can do that becase it can compromise the security of the machine so it is generally frowned upon.
When you are saying this, does it mean that there's some other thing that can achieve this besides ActiveX? Or, you are just saying that there's a number of ways to achieve this but all of them using ActiveX?
I'm trying to understand which way/technology should I point my efforts (and time) on looking for the solution...
|
|
|
|
|
TechnoSpike wrote: When you are saying this, does it mean that there's some other thing that can achieve this besides ActiveX? Or, you are just saying that there's a number of ways to achieve this but all of them using ActiveX?
As far as I'm aware they all use ActiveX. There may be non-ActiveX solutions that I don't know about.
TechnoSpike wrote: I'm trying to understand which way/technology should I point my efforts (and time) on looking for the solution...
Just remember, users will get pissed off if they think you are trying to compromise their system. ActiveX controls bring up lots of security warnings when they are first encountered and installed to give the user the option of denying it access to their system. Obviously, if they deny your ActiveX control access to their system there isn't a lot you can do.
|
|
|
|