|
Nooblet question. how do i go about doing that?
Regards DMC
|
|
|
|
|
Here's a tip for you. Voting down my posts is NOT the way get me to help you.
led mike
|
|
|
|
|
led mike wrote: Here's a tip for you. Voting down my posts is NOT the way get me to help you.
But surely you're used to it by now.
|
|
|
|
|
I just assumed a large dyslexic membership here at CP, was I wrong?
led mike
|
|
|
|
|
Will you both stop using my post to chat crap please. if you have nothing productive to say about the matter at hand then please go forth and FYS.
Regards DMC
|
|
|
|
|
DeanCook wrote: Will you both stop using my post to chat crap please. if you have nothing productive to say about the matter at hand then please go forth and FYS.
f*** off a**hole
led mike
|
|
|
|
|
|
DeanCook wrote: Rude!
you mean this?
DeanCook wrote: Will you both stop using my post to chat crap please.
Yes it was.
led mike
|
|
|
|
|
I believe i have found a solution to my problem, quote me if im wrong, but if i convert my web app to a winform app, it should be alot simpler to convert into a console app. logic is sound not sure about the method of it all, ill keep ya posted.
|
|
|
|
|
I have a textbox inside a usercontrol that is part of a modal window. I would like to set the focus to that control once the modal window is displayed. I have tried calling the controls focus() method. I have also tried adding script. It is just not working.
this.mpe.Show();
this.EmployeeNumber1.resetControl();
this.Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "money", "document.getElementById('" + this.EmployeeNumber1.TextBoxEmployeeNumber.ClientID + "').focus();", true);
Any Ideas?
I didn't get any requirements for the signature
|
|
|
|
|
Try to use
TextBoxEmployeeNumber.UniqueID
instead of
TextBoxEmployeeNumber.ClientID
|
|
|
|
|
Still didn't work. This issue appears to be this.
the output renders my javascript but the modalpopupscript comes after my script and therefore the focus is reset to something else.
<script language="javascript"> document.getElementById('ctl00$EmployeeNumber1$txtEmployeeNumber').focus(); </script>
<script type="text/javascript">
(function() {var fn = function() {AjaxControlToolkit.ModalPopupBehavior.invokeViaServer('ctl00_mpe', true); Sys.Application.remove_load(fn);};Sys.Application.add_load(fn);})();Sys.Application.initialize();
Sys.Application.add_init(function() {
$create(AjaxControlToolkit.ModalPopupBehavior, {"PopupControlID":"ctl00_ModalPanel","dynamicServicePath":"/TankBookWeb/tanklist.aspx","id":"ctl00_mpe"}, null, null, $get("ctl00_btnX"));
});
</script>
I didn't get any requirements for the signature
|
|
|
|
|
How can I get rowindex in gridview
I have gridview with 2 template column one of them are dropdownlist and the secound field is label
when i select on the dropdownlist the value showed in the label in the secound field
i want to know the rowindex in gridview which i select the dropdownlist in it
i used this code
mygridview.SelectedRow.RowIndex;
and
this code also
gvProfessions.SelectedIndex;
but it not work it return to me -1
please help me
Kareem Elhosseny
|
|
|
|
|
see my answer in the other thread.
|
|
|
|
|
That answer would solve mine (Gridview check box event handling in javascript) also...though I am using a datagrid and he is using a table....situation is same
Can somebody answer any of these
Sorry for making another post for the same question.
|
|
|
|
|
protected void Button1_Click(object sender, EventArgs e)
{
/* The code to send values to database */
/* AFTER SUCCESSFUL SENDING OF VALUES A JAVASCRIPT ALERT,
Mr. Abhijit's code which worked perfectly
Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID,
"alert('Hello World');", true); */
/* Now when user click ok of alert box then redirect to home.aspx, HOW TO DO THIS? */
}
thanks in advance
|
|
|
|
|
If(alert.checked)
{
Response.Redirect("home.aspx")
}
Or put it in the event handler
"Sex is not the answer, it's the question and the answer is yes"
|
|
|
|
|
windhopper wrote: If(alert.checked)
What is the 'alert' here?
EVEN THE WORD IMPOSSIBLE SAYS I M POSSIBLE.
|
|
|
|
|
what is alert? how asp.net know what is alert.checked, how event handler work for javascript alert in asp.net.
|
|
|
|
|
replace
Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, "alert('Hello World');", true);
with
Page.ClientScript.RegisterStartupScript(this.GetType(), this.ClientID, "alert('Hello World');document.location='home.aspx'", true);
|
|
|
|
|
THANK YOU TOOOOOOOOOOOOO VERY MUCH THANKS ALOTTTTTTT, CODE WORKED PERFECTLY
|
|
|
|
|
Hi! guys i'm using jquery to do some interesting interaction in a sms sending web application.from a textbox where the user should write the phone number(numbers are comma separated) after writing a comma the application extract that number and send it through jquery ajax function for number validity.so far everything is cool even though i know that my function extracting is not perfect(coz it becomes buggy when the first comma is pressed and then the number is edited if somebody fell to give better algorithm i would be pleased).the problem arises when collecting the response from the webform.the response which a boolean is actually sent with this Response.write(response).when i display it from an alert function is dispay something like
true
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1">
<div>
</div>
</form>
</body>
</html>
how do i extract actually the value true or false. my code is not seeing the true but always execute the statment in case it's false even though i have it true and displayed as described in my checkout alert function
here are my codes.
this is the one using the jquery
<br />
<![CDATA[<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" EnableViewState="true" %>]]><br />
<br />
<![CDATA[<br />
<br />
<html xmlns="http://www.w3.org/1999/xhtml"><br />
<head runat="server"><br />
<link rel="Stylesheet" type="text/css" href="styles/txtBuddy.css" /><br />
<title>Untitled Page</title><br />
<script type="text/javascript" language="javascript" src="library/jquery-1.2.6.js"></script><br />
<br />
<style type="text/css"><br />
#vall { color: #0000FF; width:30px;float:left;margin-left: 10px} <br />
#err { color: #FF0000; width:30px;float:left;margin-left: 10px}<br />
</style><br />
</head><br />
<body><br />
<form id="form1" runat="server"><br />
<script type="text/javascript" language="javascript"><br />
$().ready(function(){<br />
var i = -1;<br />
$('#txtNumbers').keyup(function(e){ <br />
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;<br />
if(key== 188)<br />
{<br />
var y = $(this).val(); <br />
if(y.length!= 0 )<br />
{ <br />
var n = y.substring(i+1,y.lastIndexOf(','));<br />
i = y.lastIndexOf(",");<br />
alert("index " + i + " and value " + n);<br />
if(n != " " && n.length > 1)<br />
{<br />
$.ajax({<br />
type:"POST",<br />
url:"DestinationChecker.aspx",<br />
data:"number="+n,<br />
success:function(msg){<br />
if(msg=="true")<br />
{<br />
alert("true");<br />
alert(msg);<br />
$('#valid').append("<div id="vall">"+n+"</div>");<br />
}<br />
else <br />
{<br />
alert("false"); <br />
alert(msg);<br />
$('#valid').append("<div id="err">"+n+"</div>");<br />
}<br />
}<br />
});<br />
}<br />
else<br />
{<br />
alert("Please enter a number before the comma");<br />
}<br />
}<br />
}<br />
<br />
}); <br />
});<br />
</script><br />
<asp:panel id="container" runat="server" height="850px" style="z-index: 100; left: 25px;<br mode=" hold=" /> position: absolute; top: 38px" width="700px" bordercolor="Teal" borderstyle="Solid" xmlns:asp="#unknown"><br />
BorderWidth="0.5pt" CssClass="grandcontainer"><br />
<br />
<asp:textbox id="txtNumbers" runat="server" style="left: 47px; position: absolute;<br mode=" hold=" /> top: 284px; z-index: 103;"></asp:textbox><br />
<br />
<asp:button id="btnSend" runat="server" style="z-index: 109; left: 61px; position: absolute;<br mode=" hold=" /> top: 793px" text="Send Message" onclick="btnSend_Click" /><br />
<asp:button id="btnReset" runat="server" style="z-index: 110; left: 202px; position: absolute;<br mode=" hold=" /> top: 793px" text="Reset" usesubmitbehavior="False" /><br />
<br />
<asp:panel id="valid" runat="server" height="14px" style="z-index: 123; left: 273px;<br mode=" hold=" /> position: absolute; top: 625px;float:left" width="348px"><br />
</asp:panel><br />
</asp:panel><br />
</form><br />
</body><br />
</html><br />
and the called page code behing file
<br />
using System;<br />
using System.Data;<br />
using System.Configuration;<br />
using System.Collections;<br />
using System.Web;<br />
using System.Web.Security;<br />
using System.Web.UI;<br />
using System.Web.UI.WebControls;<br />
using System.Web.UI.WebControls.WebParts;<br />
using System.Web.UI.HtmlControls;<br />
using System.Text.RegularExpressions;<br />
<br />
public partial class DestinationChecker : System.Web.UI.Page<br />
{<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
string number = Request["number"];<br />
number = number.Trim();<br />
if(number.Length != 0)<br />
{<br />
bool res = this.checker(number);<br />
Response.Write(res);<br />
}<br />
}<br />
public bool checker(string testNumber)<br />
{<br />
Regex patterns = new Regex(@"^([1-9]{1}\d{8,15})$");<br />
Match m = patterns.Match(testNumber);<br />
return m.Success;<br />
}<br />
}<br />
<br />
PS:sorry for the appearance my code was a bit long so i was oblige to cut out some unnecessary lines for this topic
eager to learn
|
|
|
|
|
hello there! noone has something to share with me? a little help? need this help to move forward.thanks for replying.if a part is not clear just tell me and i'll be glad to explain.thanks
eager to learn
|
|
|
|
|
Using sql query its possible to find the last week dates?,
Mean Current date is 7/14/2008...,
So last week dates 7/7/2008 to 7/12/2008 have to come...,
Thanks & Regards,
NeW OnE,
please don't forget to vote on the post
|
|
|
|
|
Post it in SQL Forum
cheers,
Abhijit
|
|
|
|