Responses |
Correct me If I am wrong, You want to show alert message if some string are equal in Page_Load Event ?
If yes, try like this
if(st1.equal(st2))
ClientScript.RegisterClientScriptBlock(typeof(Page), "myscript", "alert('Equla String')", true);
Let me know if you have any more issue.
Thanks ! Cheers !
Abhijit
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
but don't display alert will try to display error image
Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
Please show me your code snippet and Let me know if you have AJAX ScriptManager in your page.
Cheers !
Abhijit
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
using html not use sever control or ajax.simple i have check string is match create table using java script display image
Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
Below is the sample code for your solution.
<img src="/myimage.jpg" id="img1" />
<input type="button" value="submit" onclick="ChangeImage()" />
<script language="JavaScript">
function ChangeImage() {
alert(document.getElementById('img1').src);
document.getElementById('img1').src = "http://www.dotnetfunda.com/images/DotNetLogo.gif";
}
</script>
Clicking button will change the image of the <img> tag.
Thank you. Regards,
Raja
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
Hi raja,
i will use in form load event
Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
I think raja is quite correct, Call the JS function from Page load as I suggested, tell one think what is your exact scenarios , why you are not using any validation control ?
Cheers !
Abhijit
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
In page load have a checking condition and call the javascript function if that string occures.
ClientScript.RegisterClientScriptBlock(this.GetType(), "ClientScript", "showimage()");
In aspx add the script calling function as follows
<script language="JavaScript">
function showimage() { alert(document.getElementById(id of image).src); }
</script> With regards
Nishithraj Narayanan
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
stop reply i have solve that problem
Thanks
SagarP
http://www.emanonsolutions.net
http://emanonsolutions.blogspot.com/
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|
Then mark it as resolved...
With regards
Nishithraj Narayanan
Sagarp, please login to Mark As Answer, if this helps |
Alert Moderator
|