|
|
I have a textbox in web application.
It should be accept only numeric values If we are trying to enter other than numeric values the message box should be arraised the error message
like pls enter only numeric values....
Hello this is Ravi
|
|
|
|
|
Use Validation Control with that text box.
Example:
<asp:textbox id="urTextBox" runat="server">
<asp:requiredfieldvalidator controltobevalidate="urTextBox" text="Error">
|
|
|
|
|
You must to use this regular expression on custom validation control
[^0-9]*
keep Learning and you never will be out of date...
|
|
|
|
|
i have a textbox in a form and now i want use it in the other form . how can i do this?
in C#(asp.net)- vs2005
|
|
|
|
|
Do you want use the text wrote at textbox on form1, onto another form?
keep Learning and you never will be out of date...
|
|
|
|
|
i would like also
pls tell me
Parwej Ahamad
|
|
|
|
|
The Rahithi Solution is the best one, but, you know the session vars used Ram Memory.
The another solution is using request and response command, but it only works for one page to the next page, not to all pages (thats the session var solution)
here we go
On page 1
string var_text = TextBox1.Text;
Response.Redirect("page2.aspx?var1=" + var_text, true);
On page 2
On page load or any page 2 process
string txt_box_page1 = Request.QueryString["var1"];
keep Learning and you never will be out of date...
|
|
|
|
|
Thanks,
I know every thing whatever u write.
but server.execute is used to transfer on page control to other page.
but problem is that we can not restrict that no of control transfer on second page.
i can also use server.transfer() all item available in context.item.
but i thought u will give information something different.
thanks again.
Parwej Ahamad
|
|
|
|
|
hi,
take one session variable, and assaign the Textbox.text(text box value) to session variable and read that value in the next pages.
Regards,
Rahi
|
|
|
|
|
Hello,
I want a WebPartZone control which should disply image at the left corner of the title bar.
How to develop WebPartZone, WebPartChrome?
Please tell me how to create it.
Waiting for reply..
Thanking You.
|
|
|
|
|
pls find this url
http://dotnetjunkies.com/QuickStartv20/aspnet/doc/ctrlref/webparts/webpartzone.aspx
Parwej Ahamad
|
|
|
|
|
Im using a message compose page to send same message to 2 to 3 members.im storing status as 0(Unread) for ever user.i.e.
Name Id Event status subject message
sen(to) 23 inbox 0(unread) ssss ews
san(to) 24 inbox 0(unread) ssss ews
im displayin suject as linkbutton in gridview .when he clicks i direct him to the body of message.when sen reads i update status as 1 of(id=23).but when san opens inbox ,same msg(subject) looks read(color change) before reading the body of msg.im displayin values in gridview.hw to fix
Dhatchinamoorthy.R
9894824838
|
|
|
|
|
Friends,
Please tell me how get the return value of javascript function from codebehind page.
Now I want get the value of this function from .aspx.cs page.
Page_Load():
txtEmail.Attributes.Add("onBlur", "GetUserId(this.value)");
.aspx Page:
function GetUserId(values)
{
for(var i=0;i<=values.length-1;i++)
{
var pos=values.indexOf("@");
// alert(pos);
}
var uid=values.substring(0,pos);
alert(uid);
return uid;
}
Please Help.
Thanks in Advance.
Thanks and Regards,
Prya
|
|
|
|
|
write below code-
Page_init():
txtEmail.Attributes.Add("onBlur", "GetUserId()");
.aspx Page:
function GetUserId()
{
var obj=document.getElementByid("txtEmail");
var strval=obj.value // u can perform operation on strval or
for(var i=0;i<=obj.length-1;i++)
{
var pos=obj.indexOf("@");
// alert(pos);
}
var uid=obj.substring(0,pos);
alert(uid);
return uid;
}
Parwej Ahamad
|
|
|
|
|
hi Parwej,
Thanks for ur reply.
In the code u have given, shall i get the value of uid when I click the Button in aspx.cs page. Please help.
Thanks and Regards,
Prya
|
|
|
|
|
u have got the nd u can manipulate according to u.
Parwej Ahamad
|
|
|
|
|
can i get html code(source code) of asp.net web page which is currently running. i can view code by right click but how can i get that part on button click and save that part as html page.
i get url from
Request.URL
when i put this part in streamreader to read it gives an error called
"URI formats not supported"
how can save html part as html page.
plz provide complete codes. if anybody have.
dcjoshi2
|
|
|
|
|
u put that part u want to save in a div tag
and u use javascript [divname].innerHTML or u run the div as server control and then u can access it from the code behind
hope this would help
Best Regards
3ala2
|
|
|
|
|
Hello Frends
I m using ASP.Net 2.0 and trying to send mail but its showing me error ...
Error Message is --Mailbox unavailable. The server response was: 5.7.1 Unable to relay for dineshsharmain@gmail.com
my code is --
in web.config -
<system.net>
<mailSettings>
<smtp deliveryMethod="network">
<network
host="localhost"
port="25"
defaultCredentials="true"/>
</smtp>
</mailSettings>
</system.net>
and in .CS File -
try
{
MailMessage message = new MailMessage();
message.From = new MailAddress(txtEMailFrom.Text);
message.To.Add(new MailAddress("dineshsharmain@gmail.com"));
message.Subject = txtSubject.Text;
message.Body = txtMsg.Text;
SmtpClient client = new SmtpClient();
client.Send(message);
lblMsg.Text = DeliveryNotificationOptions.OnSuccess.ToString();
}
catch (SmtpException ex)
{
lblMsg.Text = ex.Message + " " + ex.InnerException;
}
Thanx
Dinesh Sharma
|
|
|
|
|
|
Hi Pals,
I installed the DOTNET in my computer successfully and i can run Windows application successfully. But If I run a ASP.NET application it shows a error message in a messagebox as show below
" Unable to start debugging on the web Server. Debugging failed Because integerated windows authentication is not enabled"
Please kindly hel me pals
Thanks in Advance
|
|
|
|
|
|
tht may b help u i m not sure to abut ur problem
so plz follow these steps:
1. goto controlpanel/admin. tools / IIS
2.click IIS
3.Explore Leftside Tree view and select websites/ defaultwebsites
4.select ur webproject and right click goto propeities.
5.select directory securities tab.
6.hit edit button and checked the Intergrated Windows Aunthinication checked box.
7. apply it
if tht is not solve ur problem thn uninstall ur .net framework
and IIS too.
after tht First install IIS thn install .net
hope tht helps u
bst of luck
dcjoshi2
|
|
|
|
|
Thanks DCJoshi2. I solved the proiblem. Thx yar!
regards
demane
|
|
|
|