|
You could try it, but that's just for testing purpose I think. If you want to host your sites permanently you have to look out for an ASP.NET Provider.
|
|
|
|
|
hmm.. i see . another question : is it a good ideea to redirect it to another server (on another machine) , which will be working 24h/24h ? i mean .. will it change the url seen by the client ? (www.myactualdomain.net --->www.theotherserve.blahblah... )
(i'm sorry i'm having such a hard time understanding this , i've only dealed with programming desktop applications)
|
|
|
|
|
Hi, the first problem is that the ip of your pc will change after every disconnect. This means you have to change the redirection. Snd problem I see is, that if you don't have a domain, it will look like this "http://210.32.100.1/MyWebSiteTest".
You could have a look at a technique called DynDNS. This will map a fixed domain to a dynamic ip address. But after all, I think the url change will be seen by the client.
Regards
Sebastian
|
|
|
|
|
The point is that i might find someone running a server , with a real static ip . So.. can i use this server , and still have my actual domain to redirect from? (i'm not sure i'm making myself clear.. So .. can the use just type www.mycurrentdomain.net - which is on this current host that doesn't support asp.net and then be redirected to another server - a real one , with a static and real ip which DOES support asp.net?) I just want the both : this current domain AND asp.net facilities
|
|
|
|
|
Yes you can redirect from the php-server to the asp.net-server without a problem (just a small php-script for redirect etc.). But the user will see the redirect, because the url will change. You could try to hide this by running the asp.net site within a frame (have a look at html-frames). Then the url change will not be so obvious.
|
|
|
|
|
Thank you so much,SeMartens ! i'll do what i can ; you defenitely made it clear to me
|
|
|
|
|
I have a gridview that row's cells contain textboxes. Currently, I highlite the row, in yellow using javascript, by changing the backgroundColor of each of the rows cell's textboxes. To set the backgroundColor I use the .childNode[0].style.backgroundColor = 'Yellow', see code below:
gridViewCtl.rows[index].cells[i].childNodes[0].style.backgroundColor = 'Yellow';
Now, I have a set of css files defined and would like to use a color defined in my css. Does anyone know how this can be done?
Thanks,
Steve
|
|
|
|
|
CSS:
.whatever { background-color: #ffff00; }
...
JS:
gridViewCtl.rows[index].cells[i].childNodes[0].className = 'whatever';
|
|
|
|
|
I am using .className and setting my CSS value; however, the value is not being picked up. I ran into a similar problem because I had a default .skin for textboxes. In this case I'm not sure why it is not picking up my CSS tag value.
Thanks,
Steve
modified on Tuesday, October 21, 2008 3:33 PM
|
|
|
|
|
The problem was that I was setting the controls backgroundColor using .style.backgroundColor = 'White' before I was setting the .className using css. When I used .className with both 'NormalWhiteBackColor' and 'YellowBackColor' css, things worked fine.
|
|
|
|
|
Hello
I am using this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script language="javascript">alert('" + ex.Message.Replace("'", "") + "');</script>"); to show errors on an aspx webpage which are caught using a try catch block.
When the error message contains "\r\n" it throws an Unterminated String Constant error in javascript.
I can resolve this quite easily using this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script language="javascript">alert('" + ex.Message.Replace("'", "").Replace("\r\n", @"\n") + "');</script>");
Does anyone know a more elegant solution to this though, as i presume "\n" etc. also might cause the same problem?
Thanks
|
|
|
|
|
|
Sorry I think you misunderstood me... for e.g. error message "Index was out of range. Must be non-negative and less than the size of the collection.\r\nParameter name: index" renders as:
alert('Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index');
It should render as:
alert('Index was out of range. Must be non-negative and less than the size of the collection.\nParameter name: index');
so as not to throw a javascript error.
I suppose I could use this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script languaue="javascript">alert('" + ex.Message.Replace("'", "").Replace("\r", "").Replace("\n", @"\n") + "');</script>");
Just thought there might be an easier solution...
Thanks
|
|
|
|
|
Use "\\n" . That makes the first two slashes the escape sequence, and the n a plain character.
|
|
|
|
|
To properly escape a string value that you put in a javascript string literal, you replace \ with \\ and ' with \'. Before that you can replace a line break with the escape code \n.
And don't use the language attribute in the script tag. It's been deprecated for many years.
this.ClientScript.RegisterStartupScript(this.GetType(), "Message", "<script type="text/javascript">alert('" + ex.Message.Replace("\r\n", @"\n").Replace(@"\", @"\\").Replace("'", @"\'") + "');</script>");
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
How to write client-side validation code?
E.G.
a page has a dorpdownlist(identityDdl), a TextBox(identityTxt) and a TextBox(remarkTxt)
identityDdl has 3 items: Indentity Card, Martial Certificate and other
when selected "Indentity Card" or "Martial Certificate " check id of the correct format use CustomValidator on client, when selected "other" dont check.
if the characters more than 300 of remarkTxt.
With CustomValidator How to validat on client?
How to verify the results back to the CustomValidator?
Thanks.
|
|
|
|
|
You can use javascript for it.get the control by its ID,then check the value and for correct format you can REGEX.
Cheers!!
Brij
|
|
|
|
|
I saw so many people write like this:
<script type="text/javascript">
function valComments_ClientValidate(source, args)
{
if (args.Value.length > 10)
args.IsValid = false;
else
args.IsValid = true;
}
</script>
But I try it not successful.
How to setting the page validat is true or false?
|
|
|
|
|
This looks OK. Do you have firebug installed? If yes, try to debug your JS.
|
|
|
|
|
Hi:
I am usig Calender extender control to select date.it works fine but the issue is while storing in SQL table the date is stored with Defaulttime like below:
"10/7/2008 12:00:00 AM".My Requirement is like if a customer calling yesterday 10.30AM .Today I am entering the Customer calldetails date " 20-10-08 " with time 10:30AM it has to be stored like 20-10-08 :10.30AM.I want to know the following details
1)Is there any control to select Date and Time simultaneously.
2)How to Enter the Date and Time in Storedprocedure.(Here the Time meant not default time but user defined time like 10:30AM.plz kindly let me know its very urgent.
Thanks
suresh
|
|
|
|
|
|
can anybody please guide me what are the key points to keep in mind while converting a desktop/client server application to a web appliation
and
next question of mine is in previous application developer has used more than 20 datatables to in which on the beggening he is filling the data from the different tables and then using them in the forms...
now what will be the alternative or best approach to do same functionality in the web so that each datatable is accessable in all froms....?????
1) do i have to fill all the datatables and keep them into sesssion if i do that will these session effect the website while loading time???
umerumerumer
|
|
|
|
|
Main thing to remember, desktop is stateful, web is stateless. And yes, holding 20 datatables in session will be bad for performance.
If really necessary (and if they are application general stuff), consider the cache.
|
|
|
|
|
mr_muskurahat wrote: can anybody please guide me what are the key points to keep in mind while converting a desktop/client server application to a web appliation
1. Web Application should be deployed in a central location (Web Server ) , so you need to maintain session for all user becase all user access the same application.
2. Look into server side and client side code. avaoid unnecessary post back to server.
mr_muskurahat wrote: 1) do i have to fill all the datatables and keep them into sesssion if i do that will these session effect the website while loading time???
Yes you can store your datatable in a session and can access from all of the appliction.
at the time of Storing Datatable in a session , you should consider about the datatable size and also session size etc., because it can damage your application performance.
If DataTable Data is same for all user and not frequently changed then you can Use Caching or Application Variable.
cheers,
Abhijit
|
|
|
|
|
For your first question
A: You need to keep in mind all the user based data,so need better session management(try to reduce session data per user).
B: Minimise the size of aspx pages becuse it can severely harm the perfomrmance of your application.
C: If you application is very secured,don't send the valuable data in plain text always encrypt it and use HTTPs.
And for second,
if they are shared for all users the use cache else it will be better to use some database smartly else you apllication is going to be very slow.
Hope your query will be resolved by this
Cheers!!
Brij
|
|
|
|