|
Javascript. The way I'd do this is to add an oncheckchanged ( or whatever it is ) event to each checkbox, and keep count of how many items have been checked. IF too many are checked, reject the click and show a message.
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 )
|
|
|
|
|
I would like to find out how to convert HtmlTextWriter to either a string or a stream? I am working with an application that requires this to be either in a string or stream format and I can't seem to accomplish this. ToString only gives me the object name. Any assistance would be appreciated. Current language is C# but VB is fine.
Thanks,
Leo T. Smith
Senior Programmer/Analyst
|
|
|
|
|
I would like to add one thing. All I am trying to get is the whole page response file in a string before I send it to the browser. I really don't want to iterate through all the controls and build the page manually.
Thanks,
Leo
Leo T. Smith
|
|
|
|
|
Are you trying to get the full raw HTML response for the entire page or for just a control?
|
|
|
|
|
Yes I want the complete raw html, like you would see in a text editor, or by going view source.
Thanks,
Leo T. Smith
|
|
|
|
|
Create a StringWriter and create the HtmlTextWriter using that. The ToString method of the StringWriter returns what's written to the HtmlTextWriter as a string.
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Is there a function call to convert a current HtmlTextWriter to a StringWriter before using the ToString function in the StringWriter?
Thanks,
Leo T. Smith
|
|
|
|
|
Cast the InnerWriter property to StringWriter (assuming of course that the HtmlTextWriter is actually based on a StringWriter).
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
|
Does anyone have any advice regarding running a background processes or threads in an ASP.NET application. I know it's possible to kick off a background process by responding to Application_Start events in the Global.asax file and using some sort of singleton class.
I basically want a task scheduller that kicks off at a certain time without any user intervention and sends emails, or writes to a database etc. The main issue I have is how to keep it running because the ASP.NET AppDomain can get reset or shutdown for a number of reasons, such as when there's no user activity. So my main question is how could I keep it running? I read somewhere someone suggesting getting the background process to do an HttpWebRequest it's own website, thus keeping the AppDomain running, would this work do you think?
Also I know about running a Windows Service, but since I'm on shared hosting this isn't an option.
Many thanks for your help!
|
|
|
|
|
I am trying to loop though the contents of a formview and depending on the control type do something. My formview doesn't pick up all the content inside of the table. Basically I am just going to have a reset button that loops through and sets the text to "". Thoughts?
<asp:FormView ID="FormView1" runat="server">
<ItemTemplate>
<table>
<tr>
<td>Hole1</td>
<td>Hole2</td>
</tr>
<tr>
<td><asp:textbox ID="txtScoreHoleOne" runat="Server" /></td>
<td><asp:textbox ID="txtScoreHo" runat="Server" /></td>
</tr>
</table>
</ItemTemplate>
</asp:FormView>
|
|
|
|
|
Is using an <input type='reset' /> button not an option?
|
|
|
|
|
I have a pretty big website where website configurations are written in separate XML files(not in web.config). I have a class which reads this configurations. This configurations will be same for all the visitors.
So I am looking for a method to cache this classes instance for improved performance. But since I am using this class inside my business layers, I don't have access to the Page object. Is there anyway to cache it and get it back without using Page object ? Any help would be appreciated
|
|
|
|
|
As far as i remember you can access the cache using the httpconext
httpcontext.current.cache.add, etc
Hope that helps
|
|
|
|
|
Thanks, But I guess, I don't have handle to HttpContext class inside my class.
|
|
|
|
|
You will have, as long as the class is called from a web site you will be able to access httpcontext.current.cache, .request, .response and all that stuff... Give it a try
|
|
|
|
|
hi there
I have an ASP project connected to an SQL dats base
and I need to have a backup of the project in an external page with the database
your urgent help is appreciated
Thanks
knowledgestudent
There is always something to learn
|
|
|
|
|
asp and asp.net are two different things, which one are you using ?
What do you mean by having a backup in an external page ?
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 )
|
|
|
|
|
sorry it was my bad
it is ASP.Net
and the backup I meant that is I want to have a copy of my project in an external storage device(CD , flash memory or an external HD)
thanks a lot
knowledgestudent
There is always something to learn
|
|
|
|
|
Hi.
Did any1 have experience with how 2 integrate office communicator (IM) /ASP.NET web application?
Thank u,
Alex.
|
|
|
|
|
hi,
i am using ajax tool kit and wrote the code for dynamically loading images but when i run the application it is not showing any images.i am giving the code what i have wrote.
public static AjaxControlToolkit.Slide[] GetSlides()
{
System.Web.UI.Page ObjUIPage = new System.Web.UI.Page();
int i = 0;
int j;
System.IO.DirectoryInfo DirInfo = new System.IO.DirectoryInfo(ObjUIPage.Server.MapPath("") + "\\images");
System.IO.FileInfo[] files = DirInfo.GetFiles();
j = files.Length;
AjaxControlToolkit.Slide[] mySlides = new AjaxControlToolkit.Slide[j + 1];
foreach (System.IO.FileInfo di in files)
{
mySlides[i] = new AjaxControlToolkit.Slide(di.FullName, di.Name, di.Name.Substring(0, di.Name.IndexOf(".")));
i = i + 1;
}
return mySlides;
}
**************************
and this is ajax slideshow tag what i wrote is
<cc1:slideshowextender id="SlideShowExtender1" runat="server"
="" targetcontrolid="Image1" slideshowservicemethod="GetSlides" nextbuttonid="nextButton" playbuttontext="Play" stopbuttontext="Stop" previousbuttonid="prevButton" playbuttonid="playButton">
can anybody help on this.
Regards
siva
|
|
|
|
|
Hi i have one genral doubt in .net...,
If any have idea abt that plz share with me,
I like to secure my page from the enduser...,
i dont like to allow enduser to save my form design on his desktop & same time i dont like to see them my viewsource also...,
Its possible?,
I dont the question on here is correct or not...,
But i like to know thsi info,
Plz help me,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
HMagesh wrote: dont like to allow enduser to save my form design on his desktop & same time i dont like to see them my viewsource also...,
Its possible?,
If you don't want the end-user to save the HTML design and If you don't want the end-user to see the HTML source then deny the access to your site.
simple, Modify the authorization section in the web.config file
<-authorization>
<-deny users="*" />
<-/authorization>
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|
|
Hi John,
Thanks for ur reply,
If i give deny users="*"
It wont allow enduser to visit also that page...,
Actually i feel i didnt say my quest proper format...,
see,The end user can visit my site...,
But if he try to save the webpage on his system,it won't allow and if he left click the page and try to see view source it wont show the design code that one i asked...,
Its possible?,
Thanks & Regards,
Mageshh,
please don't forget to vote on the post
|
|
|
|
|
You can't take full control over disabling the options in the client-side browser for security reasons. I don't think it's possible to disable the "Save AS" option in the browser. More over once the HTML is rendered to the client, the page is available on the client. User's are smart enough to find the cached page in the history and open it in a notepad and veiw the contents. Even if you disable client-side caching still there are ways to view the HTML source of the current page. Because the HTML page is physically present there.
- Regards - JON Life is not measured by the amount of breaths we take, but by the moments that take our breath away.
|
|
|
|