|
buffering83 wrote: make Dynamic Checkbox.
After postback, Checkbos's check property is true.
But Page's CheckBox is not checkded and Text Property was changed.
reference blow code, if i clicked some button, j2j2 checkbox's check property is false,
but checkbox is checked and Text was changed to fail.
Not clear what do you want to meant. Do you want your checkbox to main to postback details when checked or unchecked ? While creating the checkbox did you set CheckBox.Autopostback = "true" and in which events you have created the checkboxes ?
|
|
|
|
|
buffering83 wrote: I make Dynamic Checkbox.
Make sure you have set 'EnableViewState=True' for the checkbox control as well as it's container. Since, you need to re-create your checkbox during postback it might be getting reset to nothing and hence the value & text.
|
|
|
|
|
Sandeep Mewara wrote: Make sure you have set 'EnableViewState=True' for the checkbox control as well as it's container
Sandeep, For Checkbox EnableViewState property works in some different way. CheckBoxControl Implement from IPostBackDataHandler . This value is not read from view state but from Postback from and this is true for those control which implements the IPostBackEventHandler. Because in Page Lifecyle, before Page_Load we have LoadViewState() and LoadPostbackData(). So, though you disable the viewstate for Checkbox, It will load the data in LoadPostbackData() method. This is same for a text box control as well.
|
|
|
|
|
Thanks!
|
|
|
|
|
|
Good Explanation. Every input control like checkbox, radio, textbox, hidden etc... loads its data from the form collection during LoadPostbackData() event.ASP.NET implements IPostBackDataHandler on every input control and it actually uses form collection to update the control in the LoadPostbackData() event.
|
|
|
|
|
Abhijit Jana wrote: This value is not read from view state but from Postback from and this is true for those control which implements the IPostBackEventHandler.
Just a minor change required here AJ. The value is read from the ViewState but overridden in the LoadPostbackData() method of the page life cycle for the controls which implement IPostBackDataHandler .
Cheers!
Ankur
..Go Green..
|
|
|
|
|
|
I'm not much of a web developer..
Anyway today I had to reinstall my machine and couldn't access my WCF services from Silverlight because I needed a policyaccess.xml file in my (local host) wwwroot!
So.. I made sure IIS was running and copied the file there.
But the thing is IIS doesn't seem to run!
Anytime I access a missing file I have 404 error, ok, but anytime I try to access an existing file of whatever format (html, png, xml, you name it!) I get the same blank / white HTML page!?!?
Why is that? How can I browse me www root!?!
I browse all apparently relevant property in IIS Management console, but can't fix it!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Super Lloyd wrote: But the thing is IIS doesn't seem to run!
Which version of IIS are you using ? Did you check Application Pool is running or Stopped ?
You may check Eventviewer to get the details of logging from IIS.
If, everything is fine, then the next thing you need to check is how you are hosting the files.
Let me know, Hope I may help you in this case.
|
|
|
|
|
sometimes, restarting IIS solves the problem.
|
|
|
|
|
Hello,
I have VS 2005. I do not see the option to select C# or VB.Net projects? It just comes back with very basic asp/html coding windows.
I have VS2005 Premier Edition, Service Pack 1 installed.
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727 SP2
Which version has the option to create C# projects?Microsoft Visual Studio 2005
Thanks.
|
|
|
|
|
You may need to reinstall VS. It doesn't seem like the C# option was installed properly
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Also, the ASP Forum is not the best place to post this.
Here is a more appropriate forum.[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
hi
how to make any text file on the client computer ?
can i get any C# asp.net sample code ?
thanks in advance
|
|
|
|
|
Short answer, No.
Internal browser security will not allow this.
You can put a FileUpload control (HtmlInputFile) on the page and allow the user to upload it.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
|
|
I made dynamic control which is checkbox.
i selected other item in DropDownList which auto postback is true.
after post back, check box's value is same not change.
So i give id which is unique( stepCheck.ID = DateTime.Now.ToString();)
And is Good working.
I think that cache problem. How can i clear cache?
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
You need to set the initial value of the check box inside:
if (!IsPostback)
{
}
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
This should help.[^]
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
I don't think that's really what he means - see my answer.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
So not actually a cache problem, more a reset.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC League Table Link
CCC Link[ ^]
|
|
|
|
|
No, not really. First time into a page you want to set the defaults but not do it again when you Postback (unless you have a reason to do so). So, wrap in the code I gave inside, for instance, the OnLoad of a page and, when you select a new value in the checkbox and PostBack, the default is ignored and the new value will appear.
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
nils illegitimus carborundum
me, me, me
|
|
|
|
|
This Link[^] might help you
|
|
|
|