i'm trying to create a mini-forum (like facebook or twitter ...), so the user logs in and enters a message, that gets stored on sql server and im now trying to display it in the page, by looping through all the relevent records the code that is corrects is:
so here i created a container, now i need to add other content within that div i tryed the samething
but of course that did not work,does anyone know of this (elements within element) can be achieved.
I have relates to how we update using a view model. I am trying to pin down whether a viewmodel is disposed once a View is rendered to the browser or whether the viewmodel continues to exist even after the View has been rendered.
Essentially I have in my viewmodel the following code:
This is used to bind html elements in my view so if I need to make a modification to a Item contained in the list can I simply access this and post the VM back to the controller or do I need to post a Item object back to the controller in the singular. Secondly where is the best place to build a gui control such as a table. If in the view I have a foreach loop and write out table fields is this the most appropriate way of achieving this or should I deal with this in the Controller or Model and pass it to the gui in the View Model?
I need to initiate an Array to hold 100 integers. Then, by user click, a random number 1-100 is generated, and subtracted from the list. In the next call, the next random number will be subtracted from the 99 numbers left, next from the 98 numbers and so on. I need to do this with AJAX and if needed a webservice. The reason I am asking here is because I am confused...Where shall I instanciate the array and how do I keep track of the removed numbers?
I've noticed that all of the text boxes in the template fields of by details view don't all line up exactly the same. I'm floating all of them to the right so I had originally expected them to line up the same. I've also noticed that the text boxes that have two validation controls, such as a REV and RFV, are further to the left than the ones that only have one validation control.
Is this because of the space that the validation control needs to render the , or what ever is chosen to be rendered? This explanation seems to match the pattern.
We have a cookie management library that writes a cookie containing some sensitive information, encrypted with Rijndael. The cookie encrypts and decrypts fine in unit tests (using Moq), works fine for MVC web applications, but when called from an ASP.net 2.0 website, the cookie cannot be decrypted. "Padding is invalid and cannot be removed."
We are sure that the cookie value is valid because we tested it 10,000 times with random data in a unit test. There is something about what ASP.NET 2.0 does when it reads and writes the cookie that causes trouble.
I don't know how strong the support of RadControls over here is, but it can't be worse than Telerik(there I'm lucky to get a response in 2-3 days), so I'm going to try here first.
Basically, I'm trying to do custom theming(using just CSS classes) throughout my application, so I tried setting the CSS classes needed on the telerik RadTab controls.
Well, when inspecting it in firebug, it adds an extra like 50 px of padding to each tab, which there seems to be no control over. This is their rendered markup
<li class="rtsLI rtsFirst"> <a href="#" class="rtsLink ui-state-default"> <!--This is the only place where I can put in my own custom CSS class--> <span class="rtsOut"> <span class="rtsIn"> <span class="rtsTxt"> Common Application </span> </span> </span> </a> </li>
Now, I know you can't see the style classes, but according to Firebug, every class prefixed with "rts" has the line padding-left: 9px in the style sheet which would of course explain the extra padding problem. (Why do they need all this nesting anyway?!)
I have a simple validator that should check if the the date format is incorrect. I am doing testing and enter 2/14/201... which gets passed through my validator as 2/14/0201. How do I prevent this and jump to e.IsValid = false;?
I have all application errors sent to my email. I keep getting this:
mysite.com/webresource.axd?d=yacsx7hz0irzn_i7ifr3morrek9u6srdkqxsjvpn3mw1&t=633598204507656250 Padding is invalid and cannot be removed.
Stack Trace: at System.Security.Cryptography.RijndaelManagedTransform.DecryptData(Byte inputBuffer, Int32 inputOffset, Int32 inputCount, Byte& outputBuffer, Int32 outputOffset, PaddingMode paddingMode, Boolean fLast) at System.Security.Cryptography.RijndaelManagedTransform.TransformFinalBlock(Byte inputBuffer, Int32 inputOffset, Int32 inputCount) at System.Security.Cryptography.CryptoStream.FlushFinalBlock() [code]....
i googled and read to add machineKey in my web.config <system.web> which i did: <machineKey validationKey='0EFA95136AEA44850D5CEDDF0CC7502B1A009.....' decryptionKey='E88EB13ADB2C3D395193AA71DBB1E...' validation='SHA1'/>
and added <pages masterPageFile enableViewStateMac="true" viewStateEncryptionMode="Auto"> to my masterpage.But i keep getting that error.
I need to change padding for one column in ASP.NET GridView, while all other CSS atributes defined in external CSS file should be left untouched. How can I do it? Update: Below is my code that solved the problem: