|
I have 3 user controls in a Asp.net page with tabs. In tab control I used asp.net server side button for tab navigation. In these 3 module ,one user control elements are dynamic.
I am creating textbox,c heckbox,dropdownlist dynamically with database value. 288 dynamic controls in that page.
While tab navigation, the dynamically created controls are losing values.
How to set view state for dynamic controls (these 288 controls)?
modified on Thursday, March 27, 2008 8:27 AM
|
|
|
|
|
Hi,I got answer myself,
While creating dynamic controls
controlName.EnableViewState=true;
give like this.
|
|
|
|
|
ViewState is restored between the Init and Load phases of the page life cycle. One thing to be aware of is that controls are given their ViewState based on position in the control hierarchy, not on a control's id.
What that means to you is that in order for your controls to receive ViewState, they must be recreated during the Init phase [either in an Init event handler or in the OnInit method]. You will also need to make sure that the control exists in exactly the same place in the control hierarchy as it did when the page rendered.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
modified on Thursday, March 27, 2008 8:54 AM
|
|
|
|
|
Hi,
I have done some validations for text boxes using Ajax and they are not working when i try in Mozilla Firefox.It works fine in IE.
Am unable to find the reason.
<asp:requiredfieldvalidator id="NReq" runat="server" controltovalidate="txtName">
ErrorMessage="Name Required" Display ="none">
<cc1:validatorcalloutextender id="NReqE" runat="server" targetcontrolid="NReq">
Any help is welcome
|
|
|
|
|
Can you post all of your code so we can try and replicate your error
|
|
|
|
|
Hello freind...
I want to use ajax in asp.net.. then how can i use ajax in asp.net application.. any tools have required for AJAx? ya any extra hardware requirement have need...
Plaese suggest me....
How to use ajax in my asp.nwt application...
|
|
|
|
|
You have to download the Ajax Tool kit .You can do it from ASP.net site
|
|
|
|
|
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/
|
|
|
|
|
AJAX is just javascript. For making that working, you don't need to download or install anything. Browsers will have XMLHttpRequest and XMLHttpResponse objects. Use that. Check this[^] to get started. If you are speaking about AJAX tool kit , you may download their libraries and use the controls provided.
|
|
|
|
|
Hallo. There are also some simple tips and demos at DHTMLgoodies.com. Good luck!!
_________________________________________________
Have a great day!!!
-- L.J.
|
|
|
|
|
HellO Friends!!!!!!!
I have written the following code to send mail using exchange mail server
MailMessage mail = new MailMessage(pMailForm, pMailTo);
mail.Subject = pSubject;
mail.Body = pBody;
mail.IsBodyHtml = true;
mail.Priority = MailPriority.High;
SmtpClient smtp = new SmtpClient();
smtp.Host = "MailServerName";
smtp.DeliveryMethod = SmtpDeliveryMethod.PickupDirectoryFromIis;
smtp.Send(mail);
but I can not send mail
what I need to update in code?
|
|
|
|
|
SwastikInfosystems wrote: smtp.Host = "MailServerName";
How about changing this for your actual mail server name?
You've given us nothing else to go on.... no error information... nothing, just a standard bit of code where were magically meant to know what's wrong.
|
|
|
|
|
you have blatently just copied this from the internet and not adapted it at all for your own use, try applying your own knowledge to the code then post on this forum
|
|
|
|
|
thank your for ur opinion .netman
If you have any suggestion please tell, otherwise do not use ur brain.
modified on Thursday, March 27, 2008 7:09 AM
|
|
|
|
|
SwastikInfosystems wrote: If you have any suggestion please tell, otherwise do not use ur brain.
Besed on the fact you use offensive language and iconography, you sir will not be getting any more help from me.
|
|
|
|
|
SwastikInfosystems wrote: otherwise do not use ur brain.
I think the irony here is if you had used your brain you would have solved your problem
|
|
|
|
|
I have to admit, you at least did a google after last time. However, you have no right to be abusive when people point out the obvious. You need to do more than copy and paste to be a programmer, you need to read the sample code you find, understand it, and configure it for your use. In this case, you need to provide a real mail server name.
I assume you just work for SwastikInfoSystems, but have you thought of telling your clueless manager that the name he chose for his company is offensive to his target market ?
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
|
Try ere[^].
SwastikInfosystems wrote: SwastikInfosystems
What a horrible name. I thought it was swastikainfosystems for a moment there. You may want to reconsider it.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
Christian Graus wrote: What a horrible name. I thought it was swastikainfosystems for a moment there.
You were not far off. check out their logo:
http://swastikinfosystems.com/[^]
I thought the indian contingecy were weird for using "My Dear", but not understanding the relevance in the Western world of using the swastika is just plain dumb! (In case you dont know the swastika was used as a religious symbol for a long time before the third reich adopted it)
|
|
|
|
|
J4amieC wrote: check out their logo
Yikes
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
A swastika is an Indian symbol and not a symbol of hatred or war, there. LOL - I just read the rest of your post, so you know that. Yes, they obviously did no research, and know nothing of western history.
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|
|
You remember Nazis. Right? Don’t worry he is an Indian. Swastika is a symbol of their god.
|
|
|
|
|
Martin Jose wrote: Swastika is a symbol of their god.
Yes, it is... but that does not change the fact that it has a very different meaning in the western world.
|
|
|
|
|
WE know that, but they obviously have no idea what it means in their target market
Christian Graus
Please read this if you don't understand the answer I've given you
"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 )
|
|
|
|