|
i also have same problem.searching for soln.
|
|
|
|
|
treeview are very slow. I have not yet found the solution
// ♫ 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 problem with Popup window in IE7 when ever i create a popup window and i try to close tat popup window its creating a new popup window. with same url. when i clik on this second popup windwo then its closing.
code:
Default.aspx
<script language="javascript" >
function OpenAnotherWindow()
{ var name = document.getElementById("txtName").name;
WindowName="test";
var left, top;
left = (window.screen.availWidth - 400)/2;
top = (window.screen.availheight - 250)/2;
settings= "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no, top="+ top +", left="+left+", height=250,width=400";
var id = window.showModalDialog('DialogPage.aspx?name='+ document.form1.txtName.value,WindowName, settings);
document.getElementById("txtName").value=id;
}
</script>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnOpenWindow" runat="server" Text="Open Window" />
<input id="txtName" type="text" /></div>
</form>
</body>
default.aspx.cs
page_load
btnOpenWindow.Attributes.Add("onclick", "return OpenAnotherWindow()");
dialogpage.aspx
<script language="javascript">
function CloseThisWindow()
{
var myName = "Popup";
var o = new Object();
o.orglevid = "1";
o.orgname = "test";
window.returnValue=o.orgname;
window.close();
return true;
}
</script>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnCloseWindow" runat="server" Text="Close Window" OnClick="btnCloseWindow_Click" />
</div>
</form>
please help me out
not this issue is in IE 7 only in IE 6 its working fine
sri
|
|
|
|
|
The reason for the second window is that you are posting the form from the dialog. As you can not post a form to a dialog window, it will be posted to a new window.
Return false from the CloseThisWindow function, so that the form is not posted.
If you don't want the form on the main page to be posted immediately after the dialog closes, you should return false from the OpenAnotherWindow function also.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
Thanx for ur response, but i traied all these ways and still my application is acting like tat only. is there any other way to this problem. pls inform me
thanx
sri
|
|
|
|
|
sri_con3 wrote: Thanx for ur response, but i traied all these ways and still my application is acting like tat only.
Then you probably did something wrong...
sri_con3 wrote: is there any other way to this problem.
Yes, if you don't want the form submitted you can avoid using a submit button (which is what the asp:Button control produces). Use an input tag with type="button" instead.
---
b { font-weight: normal; }
|
|
|
|
|
hi, thanx for your response
I checked every thing in my code. It is working fine in IE6 but when it comes to IE7 its givin theis problem. Is there any alternative for it. i have to use tat asp:button control not the input control
sri
|
|
|
|
|
As I explained before, return false from the event, and the form will not get posted.
---
b { font-weight: normal; }
|
|
|
|
|
add below code
<br />
<HEAD><br />
<meta http-equiv="pragma" content="no-cache"><br />
<base target="_self"><br />
</HEAD><br />
regards
ravi
|
|
|
|
|
Hi Ravi,
Thanx for ur response.i traid those tags.even then also its opening a new popup window but the difference is parent form is getting the focus.
i am sending the popup window's code (runtime)
Note: in form tag action attribute is automatically assigning
aaa
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
Dialog Page
</title>
<script language="javascript">
function CloseThisWindow()
{
var myName = "Popup";
var o = new Object();
o.orglevid = "1";
o.orgname = "test";
window.returnValue=o.orgname;
window.close();
}
</script>
</head>
<body onunload="return CloseThisWindow()">
<form name="form1" method="post" action="DialogPage.aspx?name=aaa" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTQ2OTkzNDMyMQ9kFgICAw9kFgICAQ8PZBYCHgdvbmNsaWNrBRFDbG9zZVRoaXNXaW5kb3coKWRkE3PwyvEwHPyG1owfw5owH52JoAI=" />
</div>
<div>
<input type="submit" name="btnCloseWindow" value="Close Window" onclick="CloseThisWindow();" id="btnCloseWindow" />
</div>
<div>
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAgKcvcyRBwLT6dHJCjZ2UnucyVCJsYvBd03DmA/bJ6Z3" />
</div></form>
</body>
</html>
sri
|
|
|
|
|
Hi ALl
i have generated one datagrid at runtime.I want to add scrollbar in that datagrid at runtime also
How is it possible?
Thanks
monika
|
|
|
|
|
its not possible to add scroll bar to a datagrid..
u can do it by placing the datagrid inside div tag and set the style attribute as style="overflow:auto"
VMSSanthosh
|
|
|
|
|
Hi
Is it possible using javascript?if yes,then if u have code,pls give me.
Thanks
monika
|
|
|
|
|
what why u need javascript for this..
no need of javascript..
just place the datagrid inside div tag
<asp:gridview id="GridView1" runat="server">
VMSSanthosh
|
|
|
|
|
<div style="overflow:auto; height :100px " >
<asp:GridView ID="GridView1" runat="server">
</asp:GridView>
</div>
VMSSanthosh
|
|
|
|
|
enclose datagrid tags inside
<div style=" OVERFLOW: auto; HEIGHT: 150px">
</div>
|
|
|
|
|
Hi
Does any one know whether ASP.net has Folder Browser object. I know that windows application has got Folder browser object, i am looking for something similar in ASP.net so that when a user clicks a button to load a file to the web server, then a folder browser opens up.
Can anyone help????
Your help will be highly appreciated.
happy coding!
|
|
|
|
|
From my openion use html control instead of ASP control because you are going to upload the file from client to server and make it run at server ok for html use this one
|
|
|
|
|
hi i have the code for you
void Button1_Click(object sender, EventArgs e)
{
// Get the HtmlInputFile control from the Controls collection
// of the PlaceHolder control.
HtmlInputFile file = (HtmlInputFile)Place.FindControl("File1");
// HtmlInputFile file = new HtmlInput HtmlInputFile();
// file.Value="@\\hd-yogeshv\Yogesh\sample.txt";
// Make sure a file was submitted.
if (Text1.Value == "")
{
Span1.InnerHtml = "Error: you must enter a file name";
return;
}
// Save file to server.
if (file.PostedFile != null)
{
try
{
file.PostedFile.SaveAs("c:\\MyPoc\\"+Text1.Value);
Span1.InnerHtml = "File uploaded successfully to " +
"<b>c:\\MyPoc\\" + Text1.Value + "</b> on the Web server";
}
catch (Exception exc)
{
Span1.InnerHtml = "Error saving file <b>c:\\temp\\" +
Text1.Value + "</b><br>" + exc.ToString();
}
}
}
void Page_Load(object sender, EventArgs e)
{
// Create a new HtmlInputFile control.
HtmlInputFile file = new HtmlInputFile();
file.ID = "File1";
// Add the control to the Controls collection of the
// PlaceHolder control.
Place.Controls.Clear();
Place.Controls.Add(file);
}
HtmlInputFile Constructor Example
Specify the file to upload:
<asp:placeholder id="Place" runat="server">
Save as file name (no path):
|
|
|
|
|
I need to amend a class module which shows a calendar view of a schedule with ranges of dates held, for booked courses, in database shown in red. The control generates a table cell for each day. I need to show a tooltip whenever the mouse is over any of the cells for a course booking showing data for the course name and a delegate list from a database.
The module uses HTMLTableCells to produce a calendar type display.
I've added a property, ToolTipText to the class module but don't know how to proceed.
|
|
|
|
|
Sppose ur cell name is like tdCell1 then use its property title like:
tbCell1.Title = "------";
|
|
|
|
|
Yes I had done that statically, setting it to "help me" in the class module but how to do it dynamically from code behind?
|
|
|
|
|
Hai to all,
How to insert a new column into datagrid for inserting a new value and it is not for updation.
and also i need to display the inserted value in the datagrid.
In this way i need to insert more the two rows with autogenerating serialno.
How to do with datagrid.Help me please.Give me an example.
Thanks in advance.
kissy
|
|
|
|
|
I'm sorry I just don't understand the question
|
|
|
|
|
Hi,
i am using sqldmo in my ASP.NET application. Iwant to list all the child table names of a parent table using sqldmo EnumDependencies() method.
Plz help me.Its Urgent
Rupa
|
|
|
|