|
Regex n = new Regex(@"^(?[0-9]|- |\+){10,20}$");...throwing this error..parsing "^(?[0-9]|- |\+){10,20}$" - Unrecognized grouping construct...please help
|
|
|
|
|
Make sure your string is well-formed. It's working at my end.
|
|
|
|
|
thank you very much..its working
|
|
|
|
|
An alternative method would be to try and use Double.TryParse , or Int32.TryParse . Something like that. If they fail to conevrt the string into a number then you have non-numeric characters in the text box.
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
Hi there.
I have saved an MS word file to my database.
I retrieve the following fields when accessing the DB:
byte[],
filename,
extension
I now want to, in code behind, open an "Download to" window, where i can save the file on my local machine.
P.S i dont just save word files... i want to save any type of file.
Can anyone help me with the problem?
|
|
|
|
|
Did you look at Response.WriteFile ?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
no, but how would you integrate the fields with Response.WriteFile
|
|
|
|
|
Basically, you set the header to say you're downloading the file, and then stuff the bytes of the file into there.
You should ask ASP.NET questions in the ASP.NET forum BTW.
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 )
|
|
|
|
|
it is a bit unclear, what header are you talking about?
"you set the header to say you're downloading the file".
could you give me an example of this?
Sorry about the "Not being in an asp forum"..
|
|
|
|
|
Icarus123 wrote: it is a bit unclear, what header are you talking about?
He would be talking about HTTP headers.
Icarus123 wrote: could you give me an example of this?
Google[^]
|
|
|
|
|
thanks for the example.
one last question, because the file has no path, only byte[], how would i populate the FileInfo, so that i can use that information in the headers and WriteFile?
|
|
|
|
|
Response.ContentType="application/zip";
Response.AddHeader( "content-disposition","attachment; filename="+filename);
Response.BinaryWrite(byteArray);
Response.End();
That will cause whatever you want, to be written to the browser so the user downloads it.
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 )
|
|
|
|
|
Hello everybody,
I have created a javascript (ajax) making a request to the server for save the infomation i have passed as arguments with the request. like this
var args = "id=" + ID + "&name=" + Name + "&sex=" + Sex + "&age=" + Age;
xmlHttp.open("POST","SaveInfo.aspx",true);
xmlHttp.onreadystatechange = function theStateChanged()
{
if (xmlHttp.readyState==4 && xmlHttp.status==200)
{
alert("Successfully Saved");
}
}
xmlHttp.Send(args);
these are OK. but i want to catch the args from my asp.net webpage.
When i am using GET method for request, i am sending arguments by query string, and in .net page i can access that using Response.QuerySting["key1"].ToString(); But this time i am getting problem. how can i access the arguments passed. Please help me.
Thanks in advance for help.
Dipak
|
|
|
|
|
Please don't cross post.
The httpRequest object has properties like responseText that you can use to get data back from the server.
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 )
|
|
|
|
|
Thanks for reply.
I just need to get data "POST" from the client side (by javascript with send method) in the page asp.net page with C# code.
var xmlHttp = GetXmlHttpObject();
xmlHttp.open("POST","SaveInfo.aspx",true);
var args = "id=" + ID + "&name=" + Name + "&sex=" + Sex + "&age=" + Age;
xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlHttp.setRequestHeader("Content-length", args.length);
xmlHttp.setRequestHeader("Connection", "close");
xmlHttp.onreadystatechange = function theStateChanged()
{
alert(xmlHttp.status);
if (xmlHttp.readyState==4 && xmlHttp.status==200)
{
alert("Successfully Saved");
}
}
xmlHttp.Send(args);
So, this is the code.
I want to access the args from the page SaveInfo.aspx . how can access that to save those on the database using C# code on this page.
Please help me.
Dipak
|
|
|
|
|
dipak.dipak wrote: So, this is the code.
I want to access the args from the page SaveInfo.aspx . how can access that to save those on the database using C# code on this page.
Request.QueryString
|
|
|
|
|
Hi sorry if i m posting this on the worong forum.
But i need help on this.
i need to ping a website but with different ip each time with the help of tor.
can ne1 help ne help will be appreciated.
Thanks
|
|
|
|
|
|
it is possible to write a a windows app that will dial a fax number and determine if the fax number is working or not ? any help is greatly appreciate
|
|
|
|
|
A FAX number would be normal telephone number, right ? If yes, you can use TAPI[^] to dial to that.
|
|
|
|
|
How Shall we correct and find the error serial port (com name) at in send SMS program in C#?
gm
modified on Monday, March 10, 2008 6:49 AM
|
|
|
|
|
I'd try sticky-back plastic and some pva glue.
|
|
|
|
|
I am working on VS2005,having a DataGridView Control bound to a data source. Out of 13 coulums in the grid, 3 columns are DataGridViewComboBoxColumn and two Text Columns have WrapMode=True. I found that add/update etc. work fine, but since the wrpped text was not properly visible, I set the AutoSizeRowsMode = DisplayedCells, and I started getting following error
DataGrid Cell value is not valid
The error repeats for all the ComboBox type Cells and contents are not displayed. Once I restore the AutoSizeRowsMode=none the error disappears?
Any help
Ashok
|
|
|
|
|
this is because you set it to DisplayedCell, if your value is null then this comes, try others
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Thanks XMen, I do not have any null cell but the error takes place. In fact in the database no field is allowed to be null.
Can you help?
|
|
|
|