|
Unless the AJAX toolkit offers such a menu ( and I don't see why it should, a menu is not an AJAXy thing ), you will need to find a third party DHTML menu and integrate it into your project.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks a lot Christian, but are you sure you cant recommend a third party DHTML menu creator that I can use? hopefully a free download
Chrismitchel
|
|
|
|
|
I know there's tons of free downloads. I am using none of them If I were, I would have gladly recommended based on my experiences.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
is it possible to record inside a web application the input from the microphone and send this data to the web server? Maybe with adobe flash or a java applet? Has anybody created something like this?
Thanks
Roland
|
|
|
|
|
Yes, it's sure possible with a .NET or Java plug in. Not sure about flash. I've not done it, no
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi... we need a component/script that will do a bandwidth speed test on a closed network. That is, the client PCs having their bandwidth speed tested will not have access to the Internet, only to the server that the test should be run against. Component/script can be Javascript, ASP, ASP.NET, ActiveX, Flash; no PHP or CGI or any other scripting language. Of course a free component/script is optimal, but the budget might support something inexpensive.
Any ideas? Thanks... Steve
|
|
|
|
|
It shouldn't be that hard to build one in-house.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hi,
I am adding a table dynamically using c# as below:-
productCell = new TableCell();
KSSCheckBox checkBox = new KSSCheckBox();
checkBox.ID = string.Format("CheckBox|{0}|{1}", x, product.OwnProductUID);
checkBox.Description = "Update";
checkBox.Checked = false;
checkBox.Attributes.Add("onClick", "HighLightCell();");
productCell.Controls.Add(checkBox);
productRow.Cells.Add(productCell);
When the user clicks the CheckBox I have to call a JS function which will highlight the table cell, and then do the reverse if the user unclicks the box again.
Trouble is I'm new to Javascript & dont really know where to start, have read plenty of examples on the Web but all of these are adding the code in the front end pages - I want to add this in code behind window.
I am including a .js in the page.aspx, which contains:-
function HighlightCell(cell)
{
Cell.style.backgroundColor = "#E0E0E0";
}
But this never gets fired when I click the check box?
Any help will be appreciated.
Thx
Janet
-- modified at 10:55 Tuesday 16th October, 2007
Lady Programmers are a rare breed!
|
|
|
|
|
It looks like there are 2 problems with your code.
But_Im_a_Lady wrote: checkBox.Attributes.Add("onClick", "HighLightCell();");
Your call to HighLightCell should pass a single argument representing a reference to the cell to update. This should read something like
checkBox.Attributes.Add("onClick", String.Format("HighLightCell({0});", ProductCell.ClientID));
But_Im_a_Lady wrote: function HighlightCell(cell)
{
Cell.style.backgroundColor = "#E0E0E0";
}
JavaScript is case-sensitive. You should change Cell to cell otherwise the interpreter won't know what is being referred to here.
Paul Marfleet
|
|
|
|
|
Hi
I have a hard time changing my generated xml content from "UTF-8" to "ISO-8859-1".
Is there a way in code behind to change it ?
Example:
hifiger2004
|
|
|
|
|
You will have to re-post with the Ignore HTML tags check box check since we can't see your example code. If you are serializing objects to get your XML (which I hope you are) you can set the encoding before you serialize to whatever encoding you want. Just make sure that whatever is de-serializing the xml is using the same encoding or you will have problems.
By the way to get the encodeing:
Encoding.GetEncoding("iso-8859-1")
So then you just need to set your encoding on your serialization object. That is slightly different based off which version of .net you are using and how you are serializing your objects.
Ben
-- modified at 9:49 Tuesday 16th October, 2007
|
|
|
|
|
This is my sample code:
Dim settings As New XmlWriterSettings()
settings.Indent = True
settings.NewLineOnAttributes = True
Using writer As XmlWriter = XmlWriter.Create("C:\xmlfile.xml", settings)
writer.WriteStartDocument()
writer.WriteStartElement("MYXML")
writer.WriteStartElement("PART1")
writer.WriteStartElement("Action")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test1")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test2")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteStartElement("test3")
writer.WriteValue("test")
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndElement()
writer.WriteEndDocument()
writer.Flush()
End Using
hifiger2004
|
|
|
|
|
So it is easy then. Just add
settings.encoding = Encoding.GetEncoding("iso-8859-1")
Ben
|
|
|
|
|
Oh, that's how it will be added. I tried it using the settings.encoding but I've got the error before because of the wrong syntax.
Anyway, it's working fine now. Thank you
hifiger2004
|
|
|
|
|
Great glad you got it working.
Ben
|
|
|
|
|
Hi,
I have a problem handling session variable.
How can I control the session variable from expiring? Is there any properties to be added in each page or to be added in web.config?
Thanks
hifiger2004
|
|
|
|
|
Hi,
You have to create them (declare) in the Global.asax file in the Session_start() event.
E.g.
Session["Name"] = "";
Regards,
Elizma
|
|
|
|
|
Hi,
I encounted this problem when the the browser or the computer is idle.
Error message below:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey>
configuration specifies the same validationkey and validation algorith. AutoGenerate cannot be used in a cluster.
hifiger2004
|
|
|
|
|
Or is there a way to handle the error so I can change the error message?
hifiger2004
|
|
|
|
|
In the web config file there is a section that you can put the timeout in:
<sessionState mode="InProc" timeout="30"></sessionState>
In the example above it is 30 minutes.
Now there are some other things to consider. Your application pool that your web site runs under by default recycles every 27 hours. Everytime that happens you will lose your session. First is is always a good idea to change your application pool recycle time to some time, perhaps early in the morning 2am, 3am when users are not using your site. Again if you application pool is getting recycled it will end your session. All of this is assuming that you are using InProc as your Session Mode. That means the Session info is stored on the web server. There are other options which would allow you session to last longer. One option stores session on a different server and the other option stores it in sql server. These each have ther advantages and disadvantages.
I would think long and hard before you decide to increase your session timeout to a large number. I really don't think you want to keep your session around for longer then an hour or so. If someone has not actively used your site in an hour you should timeout their session. They are using up resources that others could be using.
Hope that helps.
Ben
|
|
|
|
|
Hi,
I encounted this problem when the the browser or the computer is idle.
Error message below:
Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machinekey>
configuration specifies the same validationkey and validation algorith. AutoGenerate cannot be used in a cluster.
hifiger2004
|
|
|
|
|
Ok, it sounds like your web application might be hosted on a web farm. If this is true you must select a different mode for session state other then InProc which is the default. If you are using InProc and you have a web farm or cluster what can happen is a user starts there session on one web server and the session info is there, then on their next request the go to a different web server which doesn't have the session state info. That would be why you are getting your error. You need to look at having a sessions state server or store session in sql server.
Ben
|
|
|
|
|
Yes, you are right
But how can I catch the error so I can inform the user that the browser needs to be refresh. I will inform the user thru the msgbox.
hifiger2004
|
|
|
|
|
That is the wrong thing to do. Asking the user to refresh doesn't mean their next request will go to the correct web server that has their session info. They might just get the same error over and over. I think you should really look at setting up a session server so that your session state will work on your web farm / cluster.
Ben
|
|
|
|
|
Honestly I haven't tried yet if how it will be done using the session server and on how to setup he session server.
I think it will take me long enough before the session server will be created, isn't it?
But for now, I think I will have to catch the error first, but the problem is I don't have an idea on how to catch it.
Maybe that's the next thing that I must do, the session server. And maybe I will search for some steps on how to do it, later.
hifiger2004
|
|
|
|