|
in gridview runtime I am generating text box to edit fare but I want to validate that text box whether it is numeric or not.
so how can I do it.
if it is possible using CompareValidator more better.
actually I am not able to recognize that text box run time and gridview not supporting CompareValidator inside.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
A regex validator is the obvious choice here
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
hey chris can you take a look at my question teh datagrid and hyperlink dawn here. i need your help in it
The Developer - CEH
|
|
|
|
|
You can use here a regular expression validator
The Developer - CEH
|
|
|
|
|
How can I check valid date format(dd/mm/yyyy) and get difference in number of days only between 2 dates using javascript function.
thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
|
ok,thanks
You get the best out of others when you give the best of yourself.
|
|
|
|
|
I have a datagrid with a hyperlink column in it. in the hyperlink i want to send the ID from the grid and the value of the dropdawn list i have that i need to select from to show the grid. So i want to pass the ID and the selected value of the DDL in the link. Any Ideas how to do that?
Thanks
The Developer - CEH
|
|
|
|
|
Pass it as query string.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
it needed lots of work but finally it works
The Developer - CEH
|
|
|
|
|
Hie all. I have two forms frmmain and frmpopup(whis is a popup from frmmain). i want to force a postback on frmmain when a buton has been clicked on frmpopup. How do i go abt it.
|
|
|
|
|
Check the javascript that is used to do a postback, and call it yourself.
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
yes, you can do it using java script. or call java script methods from server side.
Try to learn ProgressWindow Concept
window.opener.progressWindow
This will help you. Now try to do it your self. . if you have any issue the ask me.
cheers,
Abhijit
|
|
|
|
|
is there a refresh method for window.opener.location class.
the one below is reloading the whole page but i just want a postback
if (window.opener && !window.opener.closed)
{
window.opener.location.reload();
}
|
|
|
|
|
i used this: window.opener.progressWindow and it worked.
thank you very much
|
|
|
|
|
Hi i am using update panel in my page...,
When i click add button data is storing to my datatbase..,
After that i called one method, in that i said give alert msg in javascript...,
If i wont give update panel its giving that alert msg...,
If i use update panel its executing the script, but its not giving the alert msg,
How to solve this?,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
how did you execute the script ? I think you are using Page.RegisterStartupScript to executing script.
Use This.
ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "alert('Your Message');", true);
You have to use ScriptManager to register Client Script while using Ajax on the page.
Hope this helps you !!
cheers,
Abhijit
|
|
|
|
|
Ya ur correct i am using page.registerstartupscript only...,
This one i have used in my "cs" file...,
This cs file contained method i called in my aspx page...,
In that aspx page only i have used script manager...,
So now tell me where i want to use that code(ScriptManager.RegisterStartupScript)?
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: So now tell me where i want to use that code(ScriptManager.RegisterStartupScript)?
the same place where you have written page.register....
insted of that use
ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "JavaScriptMethod();", true);
Let me know if you have any issue .
cheers,
Abhijit
|
|
|
|
|
No still i didnt get u,
See this is my code in aspx.cs file:
if(_err==0)
{
Common.CreateMessageAlert(this,_errmsg);
clearall();
}
else
{
Common.CreateMessageAlert(this,_errmsg);
}
This _errmsg i am getting from my sql stored procedure,...
And this is my cs file:
public class Common
{
//-------------Rifaqat----------//
public static bool CreateMessageAlert(System.Web.UI.Page aspxPage,string strMessage)
{
string strScript= "<script language=JavaScript>alert( \""+strMessage+"\" )</script>";
if (! aspxPage.IsStartupScriptRegistered("strKey1") )
{
aspxPage.RegisterStartupScript("strKey1", strScript);
}
return false;
}
public Common()
{
//
// TODO: Add constructor logic here
//
}
Now plz tell me where i have to use
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: Common.CreateMessageAlert(this,_errmsg);
}
This _errmsg i am getting from my sql stored procedure,...
in Else Parth just Write
ScriptManager.RegisterStartupScript(this, this.GetType(), "myscript", "JavaScriptMethod();", true);
cheers,
Abhijit
|
|
|
|
|
No not at all working,
Plz understand my probs,
My javascript alert msg in one cs file...,
This cs file method i am calling in my aspx page...,
Like this:
Common.CreateMessageAlert(this,_errmsg);
Now this _errmsg passing as a parameter for my cs file
In cs file code is like this:
public static bool CreateMessageAlert(System.Web.UI.Page aspxPage,string strMessage)
//Here getting that _errmsg as strMessage
{
string strScript= "<script language=JavaScript>alert( \""+strMessage+"\" )</script>";
if (! aspxPage.IsStartupScriptRegistered("strKey1") )
{
aspxPage.RegisterStartupScript("strKey1", strScript);
}
return false;
}
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
New one wrote: This cs file method i am calling in my aspx page...,
what does it mean ?are you calling cs methods from aspx page ? or what ?
cheers,
Abhijit
|
|
|
|
|
S i am calling cs file methods in my aspx page...,
In aspx page my script manager is there and in my cs file method i declared like this:
string strScript= "<script language=JavaScript>alert( \""+strMessage+"\" )</script>";
if (! aspxPage.IsStartupScriptRegistered("strKey1") )
{
aspxPage.RegisterStartupScript("strKey1", strScript);
}
return false;
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|