|
Hi,
Here u r pushing text of the cell.
If u want to take value from the textbox then you should find textbox in the cell and then take its text property and insert it in to the table.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
sasim@choice-solutions.com
sasim
|
|
|
|
|
HI,
You can not create a dynamic event handler but you can assign an existing one to an event of dynamic control.
1. Create a handler which u want to call when event happens.
2. Assign that to the event of your dynamic control.
protected void bttn_Click(object sender, EventArgs e)
{
//Code;
}
Create dynamic button and assign above event handler to its click event.
button bttn = new Button();
bttn.Click += new EventHandler( bttn_Click );
I hope this will help u.
Thanks and Regards,
Chetan Ranpariya
|
|
|
|
|
How do I implement or write javascript in source -> means in aspx. File
If I write as java script code I can’t access the normal button like label etc.
I want to execute function when form is loaded
How to do it?
To test I have written code like this
1.
function getlabel()
{ alert("formload");
alert(Text1.value)}
2.
void getlabel()
{
Response.Write(Label2.Text);
Response.Write(TextBox1.Text);
}
…..
neigther of this method is working
.
vijaya
|
|
|
|
|
Research the Page.RegisterClientScriptBlock method (ASP.NET 1.1) or ClientScript.RegisterClientScriptBlock (later versions - though the former will still work as well)
Fred
|
|
|
|
|
That seems like overkill for inline script wouldn't you say? Think he's asking how to add js directly into the aspx, rather than using the codebehind to register it...
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
Yes, ok - I think you're right. Oh well - two lessons for the price of one - a bargain!
Fred
|
|
|
|
|
lol!
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
Label2 and TextBox1 are the names of the server-side controls. To get access to these controls on the client-side you need to use document.GetElementById("Label2") and document.getElementById("TextBox1")
only two letters away from being an asset
|
|
|
|
|
Mark Nischalke wrote: Label2 and TextBox1 are the names of the server-side controls. To get access to these controls on the client-side you need to use document.GetElementById("Label2") and document.getElementById("TextBox1")
And then of course, use .value rather than .text to get the data out
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
I left that detail out on purpose. Got to have them think of something, can't just give it all away.;P
only two letters away from being an asset
|
|
|
|
|
ahhhhhhh - I have much to learn sensei!
TBH, was just trying to head off the next message which would probably gone something like....
"My page doesn't work - send me the codes for getting the text! It's URGENT!"
"Knock me down, I'll get straight back up again, I'll come back stronger than a powered up pacman"
(Lilly Allen / Kaiser Chiefs)
|
|
|
|
|
kvijayajyothy wrote: alert(Text1.value)}
This doesn't work for two reasons:
1 - Text1 exists on the server, not the client
2 - If Text1 is a server side control, the framework generates it's own Id for the client.
This will work:
function getlabel()
{
var controlId = '<%=Text1.ClientID%>';
var control = document.getElementByID(controlID);
if (control)
{
alert(control.value);
}
<div class="ForumSig">Christian Graus - Microsoft MVP - C++
<a href='http://blog.metalmusings.com/'>Metal Musings</a> - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )</div>
|
|
|
|
|
Hi all
I am working on asp.net application where i need to upload a file. code what i wrote is
Private Sub CmdUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CmdUpload.Click
If File1.PostedFile Is Nothing Then
Me.lblResult.Text = "No File Selected to Upload."
Exit Sub
End If
'Retrieve file information and upload to server.
Dim strName As String
strName = System.IO.Path.GetFileName(File1.PostedFile.FileName)
Try
File1.PostedFile.SaveAs(Server.MapPath("Resumes/" & strName))
Me.lblResult.Text = """" + strName + """ was uploaded successfully."
Catch ex As Exception
Me.lblResult.Text = "An Error Occured While Uploading File."
End Try
End Sub
Every thing is fine but its showing a error after the upload button is clicked " No access to write into the server " right now i am using my local system as server and i have clicked on all access permission "Write" . but getting the same error.
Pl help
Regards
Prakash Mishra(Banglore,India)
|
|
|
|
|
Try adding a line like this:
<identity impersonate="true" username="xxx" password="yyy" />
inside the system.web block of your web.config file, replacing xxx/yyy with your admin login to your computer. <u>Make sure you take this line out when uploading to the deployment server!</u> (And get the administrators of that to enable the appropriate write permissions for you there...)
Works for me - like you I could not, for the life of me, grant asp.net write permissions otherwise...
cheers
Fred
|
|
|
|
|
I wang to ask a question about GridView.
I have checkbox control and radiobuttonlist control in GridView.
The radiobuttonlist's enabled=false;
When the page load,when the checkbox is checked of the gridview's row,
the control radiobuttonlist's enabled=true;
Now, I want to implement it by javascript,How can i do ?
I had search the awnser about it ,but no .
I need help.
thank you .
Bennyzhang
Best Wishes!
|
|
|
|
|
Hi,
My asp.net 1.1 website security system depend on hashing passwords.So it is impossible to recover the password.I think when the user forgot his password the web application should generate a password for him automatically and send it to his email so he can log again using his new password.Could any one tell me how could I make the web application generate the password automatically?Is it safe to send it by email to the user?
I am too late but i will never give up
|
|
|
|
|
Yes, email is fine, it's certainly your most secure option. How you generate it is up to you, you could send part of a GUID, or have a table full of words and pull three out at random, or whatever you like.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: you could send part of a GUID
Do you mean that I should add a new column of type GUID in the users table...I think it is a great idea because the passwords I sent to them will differ from each other.
Thank you for these great ideas.
I am too late but i will never give up
|
|
|
|
|
It is better to send email to that person.
Make forgotpassword link.
On this page give a textbox so that user enters his email address.
Send him his newly generated password by email.
Update his password in your DB table.
If any quieries then please ask me.
Kartik
Software Developer
|
|
|
|
|
TheEagle wrote: My asp.net 1.1 website security system depend on hashing passwords.So it is impossible to recover the password.
Yes.
You could use brute force to find a password that gives the same hash code, but there is no guarantee that it's the same as the original password.
TheEagle wrote: I think when the user forgot his password the web application should generate a password for him automatically and send it to his email so he can log again using his new password.
Yes, that is what you normally would do when the passwords are hashed.
TheEagle wrote: Could any one tell me how could I make the web application generate the password automatically?
Pick some characters by random from a string with suitable characters. I exclude characters like "Il10oO" when generating passwords.
TheEagle wrote: Is it safe to send it by email to the user?
No, it's not safe. The email is sent unencrypted over the net, and it travels through mail servers that might be possible to hack into.
It might be safe enough for your purposes, though.
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: You could use brute force to find a password that gives the same hash code, but there is no guarantee that it's the same as the original password.
*grin* I didn't say this for fear of breaking his heart
Guffa wrote: It might be safe enough for your purposes, though.
Thing is, what's a more secure option ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: Thing is, what's a more secure option ?
:: Printing it and sending it in a sealed envelope.
:: Putting it in a text file in an encrypted archive file, and send the file and the password for the file in separate mails.
et.c...
---
single minded; short sighted; long gone;
|
|
|
|
|
Guffa wrote: Pick some characters by random from a string with suitable characters
Do you mean each time picking characters by random from the same string?Doesn't this mean that some passwords will be the same?
I am too late but i will never give up
|
|
|
|
|
So what ? Do you take steps to ensure that no two passwords are the same now ? How does it matter ? It's not like users enter a password alone, they need the username as well, right ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|