|
You need to change the regular expression based on the selection of radio button.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
That is correct, I need to change ValidatorControl on a Radio click
but like i said, i'm not familiar with how to do this.
An example code snippet would be nice.
|
|
|
|
|
Hi,
I have a very strange experience with the autocomplete extender. A User types a name of an object in a textbox. This values (after 2 characters) calls the webservice. So far so good.
If I type 'te' as string the Autocomplete extender returns 'test1', which is correct.
If I type '02' as string the Autocomplete extender returns '36446529'. If I run the Stored Procedure, which is called by the webservice which is used by the autocomplete extender, the Stored Procedure returns '0213020501', which is the correct objectname.
What changes '0213020501' in '36446529' ? No other code between webservice, autocomplete extender and textbox!
In Word you can only store 2 bytes. That is why I use Writer.
|
|
|
|
|
Hi,
I am using a fileupload control in my .net project.I am storing the file name in to the database.
Now my question is that it is possible to retrive the filename will full path back in to the fileupload while updating the record.
For example i am storing a file name "xyz.jpg" in to the database.And the file is stored in some folder say ../images/xyz.jpg.
so is it possible to get back the full path with the file name back in to the fileupload control.
If it is possible please let me know.
Regards,
Pranav
Pranav Dave
|
|
|
|
|
why dont you use
Request.PhysicalPath
to get the current physical path and add the relative to it.
|
|
|
|
|
If im understanding you right, then no, I dont think you can do that as it would cause quite a security risk. Because what if you set the directory to some personel documents...
|
|
|
|
|
If your are using ASP.NET then you may use ~ (root) operator to resolve path with server controls.
Save ~/images/xyz.jpg in database.
However, you said "Is it possible to get back full path?". Yes you can:
Use,
Server.MapPath or Request.MapPath or MapPath method.
eg.
String fullpath=Request.MapPath("~/images/xyz.jpg");
or
String fullpath=Request.MapPath("../images/xyz.jpg");
A DATAPOST COMPUTER CENTRE
(K.V Prajapati)
|
|
|
|
|
I am working on a site that will allow the user to view a video which is synchronized with other media on the website. In other words, as the video plays, at certain points the page needs to be updated to display different content. So basically, the video needs to fire events at certain times in order for the page to know it's time to change content. Would Silverlight be the way to go with this? I posted here instead of the Silverlight section since I'm not very familiar with video manipulation and didn't know if there would be a better solution.
Much thanks!
|
|
|
|
|
Silverlight will do this. ASP.NET will not.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hello,
I'm making a bulletin board with multi-file upload.
when I click Edit button, I would like to show files that I uploaded on ListBox.
so, I used both of "System.Web.UI.HtmlControls.HtmlInputFile" and "System.Web.UI.WebControls.FileUpload".
this is my code.
static public ArrayList hif = new ArrayList();
for(System.Web.UI.WebControls.FileUpload HIF in hif)
{ ... }
hif.Add(ListBox1.SelectedValue);
It gives error cannot convert System.Web.UI.WebControls.FileUpload to System.
I know ListBox1.SetectedValue is string data type.
How can I convert System.Web.UI.WebControls.FileUpload to System.string?
p.s.
I tried to use like this . (FileUpload)ListBox1.SelectedValue.
but that can't be converted.
Thanks.
|
|
|
|
|
You can call ToString(), but I doubt that's what you want. I assume you want to select the Filename property on the object.
I thikn you need a good book on OO before you do any more work.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hi all,
I am using tab container,but i want to display the tabcontainer when a menu is selected.
Can any one tell me how can i do it in asp.net+c#.
Thanks in advance.
|
|
|
|
|
Following is the Regular Expression Validator control for Validating the Image. It works fine in my local machine, but after uploading the web page and try to checking it is not working all the correct images also showing the validation error message
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ErrorMessage="Photo - Only .png,.bmp,.gif,.jpg files are allowed!"
ValidationExpression="^(([a-zA-Z] |(\\{2}\w+)\$?)(\\(\w[\w].*))+(.PNG|.png|.bmp|.BMP|.gif|.GIF|.jpg|.JPG|.jpeg|.JPEG)$"
ControlToValidate="cmdUpload" Display="None"></asp:RegularExpressionValidator>
|
|
|
|
|
Hi all,
can any one help me, by explaining the difference between AjaxClent and AjaxServer?
i am a bit confused with the two words! Ajax was introduced for the providing Client-side functionality(Like javaScript) and more user responsive web pages.
then how the term "AjaxServer" controls came in between! what is it? what is the difference?
Thanks in advance!
fttyhtrhyfytrytrysetyetytesystryrty
|
|
|
|
|
Where did you read this stuff ? Ajax conrols always run on the client and call the server, as you say.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
There are two type of controls in ASP.NET.
Thery are (i)ASP.NET Server(sometimes claled Server control) controls
and (ii) HTML controls.
The server controls are prefixed with <asp:>. We can also create our own custom server controls.
A custom server control having AJAX functionality is called AJAX server control.
To learn how to create a custom Web server control with ASP.NET AJAX functionality using the AJAX extensions in the Microsoft AJAX Library, see this[^]
|
|
|
|
|
Hi,
I have one table where there are more than 10000 records. i am getting this details but it takes so much time to retrieve the all the records. So I want to use multiple thread. So how can I retrieve it using multi threading.
Or
Is there any other solution for the same.
Thanks
sjs4u
|
|
|
|
|
better option is query optimizing. Before that index the tables...
can you send the query.....
Padmanabhan
|
|
|
|
|
Thanks for the reply.
Actually I am doing sms application.I am retrieving sendername,mobileno,mesg field from the table. so for fire the sms to that no i fetched one by one number from the table and then fired the sms. so if there are 10000 or more nos in the table then for last number it is taking to much time to fire the sms.
Thanks
sjs4u
|
|
|
|
|
Hi,
I am using the following regular expression to check for a valid e-mail address:
Regex _EmailRegex = new Regex(@"^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
When I type in my.email.@mail.com then it validates that it is a valid email address.
So when I try the following (address, subject and body are input variables):
MailMessage msg = new MailMessage("my.email.@mail.com", address, subject, body);
The I get the following error: The specified string is not in the form required for an e-mail address.
Why does my e-mail validate to try, but when I use it in MailMessage it fails?
Please can someone advise?
Thanks
|
|
|
|
|
Well, I guess the obvious answer is that your regex is not perfect. Can an address end in a dot ? I've never seen one.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
You and your snotty answers... People come to this forum seeking help and advice, not snotty answers!! Instead of chirping you could maybe have helped help a solution. I didn't say that is my e-mail address. It was an e-mail string that I was validating what could have been typed in.
|
|
|
|
|
I have a registration page.In this i validated the diff fields and ihave a reset button.problem is that when half of form is filled and i press reset button then it shows validatin error message corresponding to other fields..But i want to reset all fields when press reset button.what to do???plz help...
|
|
|
|
|
set causesvalidation = false for the reset button
Padmanabhan
|
|
|
|
|
I might be mistaken, but try to put the controls to be validated in validation group, or try setting the validation off of the reset button, I think the property name is something like CancelValidation. Let me know if this does not help.
|
|
|
|