|
thank u pathan. its working now
by
siva
|
|
|
|
|
Hi,
I am having one datagrid which displayes data from one if the tables.Now i want when yser clicks on edit only the last columns should become editable and rest should be readonly,I am using run-time bidning,So how it is possible?
GIRISH
|
|
|
|
|
if you mean the grid view control then use the smart tag to edit columns and select the column u wanna edit go to the read only property and change it to true.
I donno if this helps.
BiG RaLpH
|
|
|
|
|
hi folks.
When a asynchronous postback (ASP.NET AJAX) times out then the ClientScriptManager shows a dialog with the error message: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.
Does anyone know how this text can be localized?
Note that this is not the same as when a asynchronous postback throws an exception. That can be handled with the ScriptManager_AsyncPostBackError event and a custom error message can be sent to the client.
happy programming
Urs
-^-^-^-^-^-^-^-^-^-^-^-
no code is free of bugs
|
|
|
|
|
You're in the wrong place. We help people here. You seem to want somewhere where people will write apps for you. Expect to have to pay money if you want people to do that.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: You're in the wrong place. We help people here. You seem to want somewhere where people will write apps for you. Expect to have to pay money if you want people to do that.
Source code for instant messaging using ajax with c# application.
You probably misinterpreted the message, it looks more like he/she is offering the source code to everybody.
|
|
|
|
|
I need to know how to run a .exe file on the client side.
i.e.: I need to open winword.exe or excel or acrobat.
BiG RaLpH
|
|
|
|
|
This is a tetchy issue...
for security reasons you can not launch an EXE from ASP .net on the client side (... any hacker could just launch evil exe's).
But... if you can:
- If you want to just pregenarate an Office doc, you can send it as an stream to the client setting the content file to Excel or Word, it will open the excel file on the client side, maybe embedded on the nagivator.
- If you want to open an empty excel file you could send that as an stream (An empty excel file), following the same approach as the previous bullet.
- If you need to be able to execute the exe and you are on an intranet, on possiblity could be to have an ActiveX control that is installed on the client machine, BUT That's quite risky, I won't do that (security hole).
HTH
Braulio
/// -------------------------
Braulio Díez
tipsdotnet.com
/// -------------------------
|
|
|
|
|
thx can you plz give me some code? how to send a stream to a .doc or .xls file?
BiG RaLpH
|
|
|
|
|
|
hi all
i have some values on html page in javascript. i want to get that values in C#. how to do that.
I tried displaying it on a label, and retreave it from there.
but it is displaying the value but label.text is empty. no value in label text.
|
|
|
|
|
P_Elza wrote: I tried displaying it on a label, and retreave it from there.
Yes, that will work, as would putting it in a hidden field that is a server control. What does your code look like ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
This is the function in javascript
function display()<br />
{<br />
var localpath1 = document.getElementById('lblerr');<br />
lblerr.innerText = localpath;<br />
}
it is diplaying the value on label. lblerr is the id of label. am calling this function on pageload
but when i try to get the value using lblerr.text, it is showing null.
y is it so?
how to get value on the label
|
|
|
|
|
i think this value that you are initialzing in javascript won't persist.
Do one thing Add hidden variable runat server and assign value to that hidden varaible and use that hidden varaible at server side like this
var label1=document.getElementById('hidden');<br />
<br />
label1.value="Sandeep";<br />
and at the server side just get the value from it
hidden.Value that will return you string
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
i had tried this one also previously.
error was occuring
the error is
System.NullReferenceException:Object reference not set to an instance of an object
what is this?
how to rectify this.
am new to .net. thats y am asking all these questions.
please dont feel bad.
|
|
|
|
|
It means that you are using the object whose instance is not creaetd yet
It will also give the line number. check the line number
Which version of ASP.nET are you using ?
Please pest the code
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
on line number i have writen
string val=txtHidden.Value.ToString();
eat is wrong in this?
while debuging it is showing the value of txthiden as
txtHidden: <undefined value>: System.Web.UI.HtmlControls.HtmlInputHidden
am using .net 2003
|
|
|
|
|
OK don't add ToString();
just add
string val=txtHidden.Value;
And be sure that txtHidden is decalared in your application such as
System.Web.UI.HtmlControls.HtmlInputHidden txtHidden;
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
that all thing i have written
and i have tried this as
string val=txtHidden.Value; also
befor. it ididnt work that time so i added it to string();
i dont know wat is wrong in my code and y it is not working.
why it is taking txtHiddenas "undefined"? i have defined it previously na?
|
|
|
|
|
Check the id of the hidden control in aspx page and aspx.cs both should be identical.
Could you post your whole page ?
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Text;
using System.IO;
using System.Data.SqlClient;
namespace Web
{
public class _3B2Temp : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Button btnclick;
protected System.Web.UI.WebControls.Label lblmsg;
protected System.Web.UI.WebControls.Label lblerr;
protected System.Web.UI.HtmlControls.HtmlInputHidden txtHidden;
private void Page_Load(object sender, System.EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
InitializeComponent();
base.OnInit(e);
}
private void InitializeComponent()
{
this.btnclick.Click += new System.EventHandler(this.btnclick_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void btnclick_Click(object sender, System.EventArgs e)
{
string val=txtHidden.Value;
}
}
}
</code>
hope this is enough
|
|
|
|
|
I tried this in
private void Page_Load(object sender, System.EventArgs e)
{} also....
please dont stop replaing in between.
|
|
|
|
|
Please be sure that txtHidden value is assigned in aspx
Code looks right check my code
this is javascript function
function HideContent()
{
var hiddenVar=document.getElementById('hidden');
hiddenVar.value="Sandeep";
}
And here is the .cs file code
protected void Page_Load(object sender, EventArgs e)
{
Button1.Attributes.Add("onclick", "javascript:HideContent();");
}
protected void Button1_Click(object sender, EventArgs e)
{
if (!String.IsNullOrEmpty(hidden.Value))
{
TextBox1.Text = hidden.Value;
}
}
It is working boss in my machine
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
thank u boss
its working now
thanks a lot
|
|
|
|
|
P_Elza wrote: document.getElementById('lblerr');
If this works, odds are that lblerr is not a server control. A server control invariably has a longer client side Id than it's server side one.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|