|
thank you. excellent. how can that be con verted in c#?
|
|
|
|
|
The string literal actually looks exactly the same.
In the Javascript you need to escape the backslash characters with a backslash character:
var poboxPattern = new RegExp("^(APO|A\\.P\\.O\\.|A P O|FPO|F\\.P\\.O\\.|F P O|POB|P\\.O\\.B\\.|POBOX|P\\.O\\.BOX|PO BOX|P O BOX|P\\.O\\. BOX|POST OFFICE)");
In C#:
RegEx postboxExpression = new RegEx("^(APO|A\\.P\\.O\\.|A P O|FPO|F\\.P\\.O\\.|F P O|POB|P\\.O\\.B\\.|POBOX|P\\.O\\.BOX|PO BOX|P O BOX|P\\.O\\. BOX|POST OFFICE)");
However, in C# you can also use a @ delimited string so that you don't need to escape the backslashes:
RegEx postboxExpression = new RegEx(@"^(APO|A\.P\.O\.|A P O|FPO|F\.P\.O\.|F P O|POB|P\.O\.B\.|POBOX|P\.O\.BOX|PO BOX|P O BOX|P\.O\. BOX|POST OFFICE)");
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi there! I have an issue and I hope I can get some advice how I can fix this. Here is my issue:
I am creating a web site, and on one page, I have a gridview. I want the gridview to be populated from a code from the Page_Load method, actually a query according to the username, so I can retrieve the data what I need for the logged user and populate in the gridview. Is it possible to do that? I am using VS2005. Thx ahead, Laziale
|
|
|
|
|
|
thx for the reply, I was trying to find some nice example, but without any success so far. Can you point to me some nice example or write few lines of code how it should be done? I will appreciate a lot, thx ahead, Laziale
|
|
|
|
|
|
One thing to consider. If you populate it in the page load, then any events that may fire, will fire after you populate it. The prerender event is generally the right place to put data into databound controls, it fires after button events.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Pls Help Me!
I need one source code for build creat user and login with asp.net
in c#
|
|
|
|
|
alirezajo0n wrote: I need one source code for build creat user and with asp.net
in c#
Is it your home work and you want to do it by us ?
Try to do it your self, using Eiter ASp.Net Login control or just use simple textbox for user name and password, authenticate user from Database ( Read ADO.Net ).
|
|
|
|
|
There are a lot of sample examples on Google.
Have you tried by yourself?
Cheers!!
Brij
|
|
|
|
|
Have a look here: www.asp.net[^].
Have a look in the tutorials, there will be one that covers the built in ASP.net login control.
I'd suggest the use of google next time before posting a question...
|
|
|
|
|
I have 2 buttons.on each button click i want to change the back color of page and want to display this color till browser closes.How can i achive this.
|
|
|
|
|
koushiksaha wrote: I have 2 buttons.on each button click i want to change the back color of page and want to display this color till browser closes.
I didn't get your point, can you be more specific ?
Thanks in advance!!!
|
|
|
|
|
I have 2 html buttons.On each button click i want a different color for my page.Now i want to do it on client side ie...using javascript...not posting the page.I want to store the color till the browser closes.How can i achive this.
|
|
|
|
|
If you want to change the color then it's better if you go for theme.
Cheers!!
Brij
|
|
|
|
|
Create an event handler on your buttons click.
Set the body element to be runat="server".
On the click events, do a Body.BackgroundColor = Color.TheColorYouWant.
With the body set to runat="server", it will store the information in the page viewstate. It will keep that color until you change it again.
|
|
|
|
|
I want to change the color at client side.On server side it changes ..there is no problem.But my requirment is on client side.
|
|
|
|
|
Okay so you just have to use javascript to achieve that.
document.body.style.backgroundColor = '#000000';
|
|
|
|
|
Any idea or reference links of how to make service for sending mail when user clicks on button.
|
|
|
|
|
saurabh mohal wrote: how to make service for sending mail when user clicks on button.
If you are able to send mail without web services and you have basic idea of web services you can easily do it.
-----------------
1. Create a new web services.
2. Write Web Methods for sending mail.
3. Host your web services.
-----------
Now
1. Create a new web sites.
2. Add that web services as web reference.
3. Create Object of Web serivice class and access methods for sending mail.
Hope this will helps you !!!!
|
|
|
|
|
Are you able to do the same without webservice?
Do you know webservice?
Cheers!!
Brij
|
|
|
|
|
I recommend reading my article on how to use google. There's no need to use a web service to send mail, but once you've worked out the wonders of google ( 'C# send email' should do it ), then you can easily move up to also googling about web services.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
i want to know how to convert a asp.net project file to exe.
thanx in advance...
reply me..
|
|
|
|
|
Hi,
what exactly do you want to convert to an exe?
If you want to display asp.net pages with an exe, there is no easy way (except putting the whole engine etc. into the exe).
If you just want to get the business logic, just put your code into an assembly and use this assembly in your exe file and your asp.net application.
Regards
Sebastian
|
|
|
|
|
SeMartens wrote: what exactly do you want to convert to an exe?
No, I think he want to build web setup project!!
|
|
|
|