|
i have face a problem for creating run time event.
i have a button on page. when i have click on button , i create another button in page in run time. i want , when i click on new button so display an message on screen.
i hope , my friends , you have a solution
|
|
|
|
|
It would be best to use JavaScript here, whereby you can create elements dynamically at runtime using the document.createElement() function. Take a look at this article which may be of use.
Regards,
--Perspx
Don't trust a computer you can't throw out a window
-- Steve Wozniak
|
|
|
|
|
If you create controls dynamically, you have to recreate them on every postback.
If you create the second button in the click event of the first button, it will only be created on the first postback. When you click the second button it will not be recreated, so there won't be any control to handle the click event.
If the controls that you want to create are limited in number, it's easier to create them from the start as invisible controls. Then you can just make them visible to have them rendered in the page.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I want to get the default printer name of clinet machine to send the crystal report printout from the client machine. How can I do this. in asp.net c#
|
|
|
|
|
You can't.
To get that kind of information you would need to run a component in the browser, like a Java applet or an ActiveX component.
I'm not sure how you think that the information would help you anyway, as you can't use a printer connected to the client computer from the server code.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi , all i have a textbox inside a user control named myusercontrl. so how can i find this textbox and check if it is empty or not using javascript
|
|
|
|
|
You can access text box as follows in javascript:
document.getElementById('<% Response.Write(TextBox1.ClientID); %>').value = "";
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi, I'm new in asp.net and want to Authenticate against a sql server user store. I don't know how to find who is using my page at anytime and don't know how to Authenticate using the sql server user store.
Is there any code sample for that? I kept on google-ing and didn't get anywhere.
Thanks for your help in advance
|
|
|
|
|
Check this [^] and this[^] MSDN article
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
|
Did you try to call chosen masterpage in Page_Load event?
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.
|
|
|
|
|
yup..nothing...it has to be in or before PreInit event
|
|
|
|
|
call Master-Page on Init
♫ 99 little bugs in the code,
99 bugs in the code
We fix a bug, compile it again
101 little bugs in the code ♫
|
|
|
|
|
Hi
I have a gridview with several column.in itemtemplate of this gridview i put a button.one of column is product_id and one of them is a textbox that user input something in it. when user click on button in a row ,how can i get the product_id text and text of that textbox of that row.because i want to remove these values from a list.(I want to get text of that cell)
in which event?
please help me .thanks
|
|
|
|
|
hi,
first u have to find the child control from the grid like this
foreach (GridViewRow gv in <id of="" the="" grid="">.Rows)
{
//fetch the prodid
TextBox txtprodid = (TextBox)gv.findcontrol("mention the product id");
string prodid = txtprodid.Text;
//fetch textbox value
TextBox txt = (TextBox)gv.findcontrol("mention the tetxbox id");
string txtid = txt.Text;
}
T.Balaji
|
|
|
|
|
|
Post your code here to see where is problem.
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.
|
|
|
|
|
Set Previous query string value to null.When u don't need any more.
Request.QueryString["previous"]=null;
Then use condition
if(Request.QueryString["previous"] != null)
{
//your logic here
}
Cheers,
sekhar
|
|
|
|
|
sekhar.k wrote: Request.QueryString["previous"]=null;
The QueryString collection is read-only. You can't change the values.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi all,
My gridview has some data which i want to spool in excel. For that i wrote a code in a button click event like this
protected void imbtnexcel_Click()
{
Response.ContentType = "application/vnd.ms-Excel";
Response.AddHeader("Content-Disposition", "inline;filename=ExcelRPT.xls");
}
im using VS2008.whereas this is working in VS2005
Here the event is getting fired but excel file is not opening.How to acheive this?
T.Balaji
|
|
|
|
|
Hi,
I want to update a server by inserting DropDownList id number into server. could you Please help me with a sample code how to approch that?
thanks in advance,
Pantea
|
|
|
|
|
Hi,
I have a asp.net web page and want to get user's name as soon as the the page get load. is there any easy way to do that? is there any java or C# script for it?
thank for any help in advance
Pantea
|
|
|
|
|
Check this link[^]
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.
|
|
|
|
|
Thanks, but how can I use it for Authentication with usernames I have in mysql. In fact I want to get user's name from window, then check it with the names I have.
Is there any easy way to do that?
Will appreciate any suggestion since I’m new in this field.
Thanks in advance
|
|
|
|
|
Do you have to compare username which operator write on control (in TextBox) with username which have to exists in MySQL database? If yes then make a select statement.
select username from userstable where username='usernameGivedOnTextBox'
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.
|
|
|
|