|
Hi,
I have a gridview Gdv1 and inside that i have a TextBox txtname
i want to retrieve the value inside the textbox into a string
Thanks
|
|
|
|
|
TextBox is inside TemplateField?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
|
|
Navigate to the row containing TextBox.
then, get the string value like:
string str = ((TextBox)Row.FindControl("txtName")).Text;
|
|
|
|
|
TextBox txt2 = new TextBox();
txt2 = (TextBox)GridViewName.Rows[2].FindControl("textboxname");
string a = txt2.Text;
not working
|
|
|
|
|
Use RowDataBound event of Gridview to find the context item.
protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{
if(e.Row.RowType == DataControlRowType.DataRow)
{
TextBox tb = e.Row..FindControl("textboxname") as TextBox;
}
}
|
|
|
|
|
Hi All,
how to launch an application [say notepad] installed in the client system on button click,..using asp.net?
please respond soon.
Thanks
|
|
|
|
|
Why do you want to launch an application on the client machine from the server? This can be done using client scripting, but has very high security risk and will not work if javascript/activex is disabled.
|
|
|
|
|
Hi Dinesh,
Thanks for ur reply. How can it be done?
|
|
|
|
|
I don't exactly remember how to do it, but you need to create activeXobject for the client machine's shell and use the run command on the object to launch the intended application. This would work only on intranet applications where the browser security level allows the browser to access the client machines' shell.
I think this is the code, but not sure, please test and modify -
w = new ActiveXObject("WScript.Shell");
w.run('notepad.exe');
|
|
|
|
|
Ok, thanks dude. i will try with this info.
|
|
|
|
|
But let me remind you..
Shell commands are only available to IE... and also if it has given previledge.
It will not work in any other browser..
So I recommend you to use a custom popup div in your page to show whatever you want to show, rather than opening notepad.
Also let me know if your have some specific requirement around this ..
|
|
|
|
|
one more clarification,, how about using this?
System.Diagnostics.Process.Start("Notepad.exe")
|
|
|
|
|
This runs on the server and starts notepad on the server. This again has high security risks!
|
|
|
|
|
Hi firends,
i am new prog in .net.
How to count online user in asp 2.0...
plz give me solution....
Thanks in advance.
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Increment the Global Static variable / database field during Session Start and Decrement during Session End.
Or you may use Login / Logout as well(but there is no surety of logout).
|
|
|
|
|
ya i am increment global value. but its showing some error..
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Yaa... Application could be used as Global variable.
|
|
|
|
|
ya.. i got it...
but how we can set session time???
Yours,
KaNNaN
-----------------------------------------------------------------
"Success is When Ur Signature Becomes An Autograph"
Mail To : foreverkans@gmail.com
|
|
|
|
|
Yes.. You can go for Session_start in global.asax to evaluate the session start time.
but Rather than this, It is more logical to log the session start when actual login process occurs.
|
|
|
|
|
|
Very nice link, Nilesh. Thanks for sharing
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
how to implement chat application in asp.net
|
|
|
|
|
See couple threads below.
50-50-90 rule: Anytime I have a 50-50 chance of getting something right, there's a 90% probability I'll get it wrong...!!
|
|
|
|