|
Hai Deepak,
These are two different pages.I am using window.open for opening the second page.From the second window I want to close the first one,that is using window.close.
How can we avoid that prompt.
Jeeva
|
|
|
|
|
Hai,
I have added button using property builder in datagrid. I want to execute some functions under this button click.How I can get the server side events of that button.How I can do this? Please show me the right way.
Thank You,
Rahul.P.Menon.
|
|
|
|
|
a. use ItemDataBound_DataGrid Event
b. find the control
Dim btn AS Button = CType(e.Item.FindControl("Buttonname"),Button)
C. add your event
|
|
|
|
|
Hai Satheesh,
Thanks much for your reply.
Rahul.P.Menon
|
|
|
|
|
I'll add a different approach to sathish's answer -
Since you are adding the button in a datagrid column, you can take advantage of event bubbling within the datagrid. Assign a CommandName (and optionally CommandArgument to the button (these are properties of the button). Then in the code handler for the DataGrid's ItemCommand event, you can determine if that command button were clicked by it's CommandName . For example, if you named your button "Details", then your DataGrid ItemCommand handler might look like this:
void MyGrid_ItemCommand(object o, DataGridCommandEventArgs e)
{
if (e.CommandName == "Details")
{
}
} It's typical to use a switch statement in an ItemCommand handler if you have several buttons with CommandName's in your datagrid.
|
|
|
|
|
Hi
Try this:
int tmpid = Convert.ToInt32(datagrid.DataKeys[(int)e.Item.ItemIndex]);
string popupScript = "< Script language = 'javascript'>"+ string.Format("javaScript:window.opener.document.{0}.value = \'{1 }\';window.close(0;", request.QueryString["field"], Convert.ToInt32(tmpid)) + "";
Page.RegisterClientScriptBlock("PopupScript",popupScript);
In Properties of DataGrid, This Code as to be written in "ItemCommand" Event.
Regards,
Naren
please help me
|
|
|
|
|
Hi All
Pls help me to check size of a folder on my computer
For example
Disk C has a folder "ABC"
pls help me to check its size
My idea is to execute this problem on ASP.NET
Thanks & best regards
|
|
|
|
|
|
Hi Developers,
I am using a group of statements in Try Catch Block. When an Error occured at any line of "Try Block" control goes to "Catch Block" and skip the execution of lines coming after Error Line.
Now what I want is that "Program should start execution from line after the Error Line(Where error occurs)". I think there is some statement like Resume next is used in this case but not sure.
Thanks in advance
Lets work it Out.........!
|
|
|
|
|
the only way to do this is to wrap a try..catch around each line individually. You can also nest try..catch blocks inside a master try..catch block to handle the real critical errors
eg/
try
try
' something error-prone
catch MySpecificException ex
' do something
catch MyCriticalException ex
throw
try
' something else error-prone
catch MySpecificException ex
' do something
catch MyCriticalException ex
throw
catch MyCriticalException ex
' handle critical exception
|
|
|
|
|
Hi J4amieC
Thanks a lot for your help. Would U b so kind to tell me a little about the Flow of the code u sent to me.
Thanks
Lets work it Out.........!
|
|
|
|
|
The flow of try catch block is when your code in try block occurs an error, it will do something in catch block. After that it will do something after catch block. So that:
SqlConnection connection = new SqlConnection( "ConnectionString" );
SqlCommand cmd = new SqlCommand( "CommandText", connection );
try {
connection.Open();
cmd.ExecuteNoneQuery();
}
catch {
}
now you put each line in try block in try catch block like that:
try {
try {
connection.Open();
} catch {
}
try {
cmd.ExecuteNoneQuery();
} catch {
}
}
catch {
}
Do you understand now?
|
|
|
|
|
I m building an application in which I redirect the user to a particular page. In the Page Load event of the that page , I assign a variable some value. Then I call the Button click event on that page. I have applied the !IsPostBack so that the Page Load event does not occur on clicking the button. Now the problem is that I want to use the value of that variable which i was population on Page Load event.
Can I use that variable as static?
I have a doubt in my mind that as I am simply redirecting the users to that page, the value of that variable could be set to some another value if another user is redirected to that page as the variable is static. Please help me to clarify my concept.
Thanks,
Sandy
|
|
|
|
|
hi,
if u want to access that variable on post back u have to define that variable as static .
bye
|
|
|
|
|
The problem is that all visitors share the same static variable...
---
b { font-weight: normal; }
|
|
|
|
|
Can I store that variable in View state to remove this problem? because I don't
want to share the variable between different users.
Thanks,
Sandy Sekhon
|
|
|
|
|
Yes.
---
b { font-weight: normal; }
|
|
|
|
|
hi,
i want to install community starter kit. But database is not getting converted due to some error like incorrect syntax near function while copying files in community database.
please tell me how to install community starter kit clearly so that i will move further to make cd based database application of asp.net
Vijayendra Shinde.
-- modified at 5:33 Friday 21st April, 2006
|
|
|
|
|
we are using microsoft Office 9.0 Library & COM namespace is OWC
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1];
While writting this code it is not converting to object to string but in reverse case it is working properly uploading to spreadsheet.
//This is the Error
Error: <b>Cannot convert Object to String </b>
So pls convey this & let me know the solution for the above problem.
I m using asp.net with c# coding.
Thanking u,
Naren.
Pls let me Know
|
|
|
|
|
Could try:
TextBox1.Text = (string)xlsheet.ActiveSheet.Cells[i,1];
or
TextBox1.Text = xlsheet.ActiveSheet.Cells[i,1].ToString();
|
|
|
|
|
Hi
I have an application which uploads Photos It is working fine
But when i try to uplod a Zip folder it is giving
Page can'nt display
Help me
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
Thx for reply
If i want upload a 10MB Zip file what settings i have to change
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf
|
|
|
|
|
|
hi all,
how can i trace and debug the java script file using visual studio 2005
coolsweety
|
|
|
|