|
I think you can do this using an ActiveX (IE only). Or search for some third party controls that allow you to do this.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
No.... You cant...
Fileuploader should point the file by opening OpenFileDialog. Even setting Value of input type="file" doesnt actually get the pointer to the disk file in the client computer.
|
|
|
|
|
yeah ,
is there any Jquery plugins for that ?
|
|
|
|
|
Sorry my friend..
If JQuery can do that .. .We can also do that.. If there is no option, how does JQuery do...
|
|
|
|
|
Hi all,
I need to show the Country DDL first, if i select the country then it has to fill the states in and after that city..
if i have a database i can do..
but its very difficult to enter all those in the database..
and i searched in web, i saw one website that they are providing db but its chargable.
is there any methods in asp side, so that we can access and show?
help me, thanks in advacne..
|
|
|
|
|
Hema Bairavan wrote: is there any methods in asp side, so that we can access and show?
AFAIK I dont Think so..!
BTW For Which Countries you need..!
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
hi shashi,
thanks for ur reply.
its a kind of data entry application , can be accessed all over the world,
so i need all the countries and its states and its cities..
is it possible?
|
|
|
|
|
|
|
I need to set all control t0 "Readonly" mode Except the Label in Page.
The structure of the control is
Panel-->div-->Table-->TableRow-->TableCell-->Controls
Here Controls are
1)RadioButtonList(10) 2)DropDownList(10) 3)Textbox(15) 4)Checkbox(5).
total i have 40 controls...
Please suggest me how to set the Readonly Property Generic for all controls.
Thanks in Advance.
JohnDas
|
|
|
|
|
|
You will need to loop through all the cells and then set there property. You can also place a transparent div over the panel so that controls beneath will be visible but not accessible (something like what happens in case of pop up).
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|
|
Hi Team,
I am having value in a table which contains in this format
180/20, 160/24
I need to show the maximum value and Min value from SQL Query
Like if Value is 180/20 then
Maximum value =180
Minimum Value =20
Please help me
|
|
|
|
|
You want to do it on the SQL query or in your C# code?
C# code - Split the text on "/" and get the max and min values from the resultant array.
SQL query - select left(ColName, charindex('/', ColName)-1), right(ColName, len(ColName)-charindex('/', ColName))
You will need to test and correct the SQL as necessary.
|
|
|
|
|
Try this
SELECT
'maximum valuue='+(SUBSTRING(valstr,1,CHARINDEX('/',valstr)-1 )),
'minimum valuue='+SUBSTRING(valstr,CHARINDEX('/',valstr)+1 ,LEN(valstr))
FROM mytable2
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
Hi all,
I need one clarification.
I am working on aspx project.
here i have a function (javascript) on my aspx file.
My question here is , is it possible to access the same function from the aspx.cs(code behind) file??
can it be possilbe by inheriting or doing something???
thanks in advance
|
|
|
|
|
As far as I know, there is no conventional method to do so.
Even if you achieve it somehow, it is useless unless you process data entered at client's browser.
"Eval()" function is the only thing I can consider which might be needed at server side from JavaScript.
BTW, Why do you want to do so?
Just call your JavaScript function in client side, Post the result back to the server,
then you can access the result at the server. After wards, you can process on the result there.
|
|
|
|
|
Am I correct in saying that you need to execute a javascript function after a particular event has been completed and the server has rendered the resultant page to the client?
If this is what you need then, just use the RegisterStartupScript method in the Page / ClientScript object, based on your version on ASP.NET, to place a call to the javascript function.
This call would be executed once the browser receives the markup
|
|
|
|
|
Hi,
User server side script to do this
Farogh Haider
Web developer
|
|
|
|
|
Hi,
I have a DataGrid that has a textbox within a template column that will populate a SQL DB.
The user can click on the edit button(s) to modify 3 different types of data in this column:
Account No
FirstName, LastName
Email Address
I have a custom validator that does server validation but I cannot work out (I am new to this) how to validate the 3 different types of data using a regular expression.
Although the validator correctly highlights the textboxes that do not match a single regex I would like to have a different regex for each textbox row within the grid. Is there any way I can do that. I have included the relevant bits of code below.
Thanks!
Graham
<asp:datagrid id="CPYInsert" runat="server"
="" autogeneratecolumns="False" backcolor="lightyellow" bordercolor="black" showfooter="false" cellpadding="3" cellspacing="0" font-size="12pt" headerstyle-backcolor="darkorange" headerstyle-forecolor="white">
<columns>
<asp:templatecolumn headertext="DataField">c
<itemtemplate>
<asp:label id="txtParam" width="100px" runat="server"
="" text="<%# DataBinder.Eval(Container.DataItem,"rtSchema") %>">
<asp:templatecolumn headertext="Parameter">
<itemtemplate>
<asp:textbox runat="server" id="txtParamData"
="" text="<%# Container.DataItem("Parameter") %>">
<asp:customvalidator id="WorkDateValidator" runat="server" display="Dynamic" controltovalidate="txtParamData" onservervalidate="ValidateEntry">*
<asp:boundcolumn datafield="Guidelines" headertext="Guidelines">
Sub ValidateEntry(sender As Object, args As ServerValidateEventArgs)
dim mymatch as match = System.Text.RegularExpressions.Regex.Match(args.value, "[0-9]{10}") 'I need to have 1 of these for each args.value returned
If Not myMatch.Success
args.IsValid = false
else
args.IsValid = true
End If
End Sub
|
|
|
|
|
For using Custom Validator and Regex
Graham Baxter wrote: args.IsValid = false
It Wont Stop the execution it will go the the Next event..!
But You can check the Event in the Button click I also got this problem .
I overcome it by Checking the args value in button click..!
But For You Case You have to go for client side validation..!
Here is the sample code i used for Custom Validation
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
try
{
int timetmp = Convert.ToInt32(EmailSettings.ReserErrorTime);
int time1 = timetmp + 15;
DateTime current = System.DateTime.Now.AddMinutes(time1).ToUniversalTime ();
if (txtReservationdate.Text != "")
{
string Date11 = ReserExactTime.Value;
string date12 = Date11.Substring(4, 21);
DateTime resertime = Convert.ToDateTime(date12);
if (resertime > current)
{
temp = true;
}
else
{
temp = false;
}
}
else
{
string Date11 = ReserExactTime.Value;
string date12 = Date11.Substring(4, 21);
DateTime resertime = Convert.ToDateTime(date12);
if (resertime > current)
{
temp = true;
}
else
{
temp = false;
}
}
}
catch (Exception ie)
{
logger.Error("ReserDate :-" + ie.Message, ie);
}
}
and i check it button click of the temp value..!
try this link for regex..!
http://msdn.microsoft.com/en-us/library/ms998267.aspx[^]
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
The args.value that the validator sends back is 1 long string of the text in all 3 of the the textboxes (i.e. 112233JohnSmithjs@email.com) so I was trying to work out out to pick each textbox field out and validate it. However, based on the regex the validator does identify which textbox has incorrect data in it...
Thanks
Graham
|
|
|
|
|
Any specific reason why you wish to have only one regular expression/only one validator? How about having 3 separate validators for the 3 controls?
I'm not sure, but check if the sender object contains the control that raised the validation. i.e. check if sender can be used to identify the which text box you are validating and then use a switch case and use 3 different regex to validate the data.
HTH
|
|
|
|
|
I don't mind having 3 validators but I do not know how to assign them to the textbox values within the datagrid as it has only '1' id. Can you give me a pointer on how to do that?
Thanks
Graham
|
|
|
|
|
I'm very sorry for not reading through the code earlier. Now, based on the code that you have submitted, it looks like all the data is thrown together in the same text box - txtParamData. So, the validator gets just one data like this - 112233JohnSmithjs@email.com
Now to validate this with one regex is not going to be easy, unless the data is of common length or there would be some separator between the data items. Is the above sample a valid data or just some text? Is there anyway that you can enforce a rule on the user to use some separator between the data items? Can you not change the design to display the data items in separate text boxes?
|
|
|
|