|
Yes. am using the Same Browser for local web server application, and the Javascript is also enabled.
|
|
|
|
|
i am using modal popup in my application. the problem is that when ever i do postback action on the popup window it disappears and control comes back to parent window. what i want is popup window should should not disappear if postback happens. plz reply....
Thanks in advance
|
|
|
|
|
Did You try using Update panel
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
|
Dear All,
I am creating html buttons at run time and I want to attach a popup menu (same as context menu in win form) at run time, well I am looking how to create popup menus in asp.net with javascript. let me tell you that those popup menu items should be clickable as other controls like button,linkbutton and so.
I am looking to create these popup menu in left click of HTML buttons.
any ideas please?
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
|
thanks a banch, I will go through the links.
Abdul Rahaman Hamidy
Database Developer
Kabul, Afghanistan
|
|
|
|
|
HI ,
the following code if am using..
i want autoclose to "dwindow" division tag after displaying for specific seconds..
<script>
var dragapproved = false
var minrestore = 0
var initialwidth, initialheight
var ie5 = document.all && document.getElementById
var ns6 = document.getElementById && !document.all
function iecompattest() {
return (!window.opera && document.compatMode && document.compatMode != "BackCompat") ? document.documentElement : document.body
}
function loadwindow(width, height) {
if (!ie5 && !ns6)
window.open("width=width,height=height,scrollbars=1")
else {
document.getElementById("dwindow").style.display = ''
document.getElementById("dwindow").style.width = initialwidth = width + "px"
document.getElementById("dwindow").style.height = initialheight = height + "px"
document.getElementById("dwindow").style.left = "30px"
document.getElementById("dwindow").style.top = ns6 ? window.pageYOffset * 1 + 30 + "px" : iecompattest().scrollTop * 1 + 30 + "px"
document.getElementById("cframe").src = url
}
}
function closeit() {
document.getElementById("dwindow").style.display = "none"
}
</script>
<script>
var howLong = 10000;
t = null;
function closeMe() {
t = setTimeout("dwindow.close()", howLong);
}
</script>
<script>
function closeHelpDiv() {
document.getElementById("dwindow").style.display = "none";
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="dwindow" style="position: absolute; cursor: hand; left: 0px; top: 0px; display: none"
onselectstart="return false" >
<div align="right" style="background-color: #FFFF99;">
<a onclick="closeit()" style="color: Red; font-weight: bold; cursor: pointer;">Close</a>
</div>
<div id="dwindowcontent">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0"
width="600" height="400">
<param name="movie" value="image/text rotation.swf" />
<param name="quality" value="high" />
<embed src="image/text rotation.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash" width="600px" height="500px"></embed>
</object>
<script>
if (ns6) {
window.onload = new Function('loadwindow(600,400)')
}
else
loadwindow(600, 400)
</script>
</div>
</div>
</form>
</body>
txs in adavance..
Supriya
|
|
|
|
|
Whats the problem? Just call closeMe() at the end of your loadwindow method.
If you need anything else or an issue, do tell
|
|
|
|
|
This code looks like a copy paste code and do you expect people to get it working for you?.
Did you notice where the problem is ?
Check in the following line ....
document.getElementById("cframe").src = url
The function have neither "url" nor "cframe" control. How this should work ??
Before posting such query why dont you put little effort to get priliminary work done?
Thanks,
Arindam D Tewary
|
|
|
|
|
actually i'm able to bind adrotator and all data source controls using asp.net configure datasource wizard but the problem is that whenever i perform any updation in the database using these controls updation is performed in the database but the information displayed in the control is not refreshed.....i know how to do it with coding but is it possible to refresh the data in the controls through the wizard only....???
modified on Wednesday, March 31, 2010 9:52 AM
|
|
|
|
|
i want to store only date in the datetime type field but if i only provide the date....it takes some time by default..i want to remove that time information....can anyone help me with that...???
|
|
|
|
|
You cannot store only date in datetime datatype.. But you can retrieve date from datetime.. search google for this..
|
|
|
|
|
Though you store the datetime in database, while taking data out of database(using select query) you have lots of ways so that you can discard the 'time' part of it.
EXAMPLE
---------------
SELECT CONVERT(VARCHAR,GETDATE(),101)
For more options please check the CONVERT function in sql server.
It should be fine that database allows user to store date and time both.
Hope it helps,
Thanks,
Arindam D Tewary
|
|
|
|
|
As others have pointed out, you have no way to store only the date part in date time field. You have to store only datetime or store the date in a string field. Doing the later would hinder you if you wish to do data manipulation based on the date value.
Now if you try to store only the date in a datetime column, the db by default would add 00 hrs as the default time value [correct me if I'm wrong].
Now you can easily remove the time part in the query using CONVERT(VARCHAR,[date column],101) . But doing so would put extra load on your query and reduce its performance.
The best way to deal with it is to get the datetime value to the application and apply formatters to remove the time part from the datetime value. All that you need to do is to set the format string for the control that is going to display the value and you would be done.
HTH!
|
|
|
|
|
hi....thanks for your reply
i've used all those functions to retrieve date from the field...but i just thought that if we would be able to save date only then how cool it would be.....anyways thanks for your reply
|
|
|
|
|
Hi..
I creatd some dynamic textboxes in repeater control.. Had a button to add textboxes.. and link button to delete the rows from db..
im deleting the rows from repeater based on id in the table...upto this its working fine. But when i click on add button to add more rows and if i want to delete those rows, as they dont have any id in table how do i delete those rows..
|
|
|
|
|
where you are keeping the newly added object?or in other words do u have any persisting DataSource object for repeater?
|
|
|
|
|
the values in the added text boxes if required they are inserted into db.. But before inserting if i need to delete them how can i...
|
|
|
|
|
test-09 wrote: the values in the added text boxes if required they are inserted into db.. But before inserting if i need to delete them how can i...
when clicking new row button how you are adding rows to repeater?Do u have any persisting object in code behind?Have tried deleting by index of the repeater item?
|
|
|
|
|
this is how im adding new row...
private void adddescription()
{
int rowIndex = 0;
if (ViewState["CurrentTable"] != null)
{
dtDesc = (DataTable)ViewState["CurrentTable"];
DataRow drCurrentRow = dtDesc.NewRow();
if (dtDesc.Rows.Count > 0)
{
for (int i = 1; i <= dtDesc.Rows.Count; i++)
{
TextBox box1 = (TextBox)Rptdescription.Items[rowIndex].FindControl("TextName");
TextBox box2 = (TextBox)Rptdescription.Items[rowIndex].FindControl("TextDate");
TextBox box3 = (TextBox)Rptdescription.Items[rowIndex].FindControl("TextDescript");
drCurrentRow = dtDesc.NewRow();
drCurrentRow["RowNumber"] = i ;
ViewState["RowNumber"] = drCurrentRow["RowNumber"];
Label1.Text = ViewState["RowNumber"].ToString();
dtDesc.Rows[i - 1]["DescriptionName"] = box1.Text;
dtDesc.Rows[i - 1]["Date"] = box2.Text;
dtDesc.Rows[i - 1]["Description"] = box3.Text;
rowIndex++;
}
dtDesc.Rows.Add(drCurrentRow);
}
else
{
dtDesc = (DataTable)ViewState["CurrentTable"];
DataRow descRow = dtDesc.NewRow();
descRow["DescriptionName"] = "";
descRow["Date"] = "";
descRow["Description"] = "";
dtDesc.Rows.Add(descRow);
}
}
Bindrepeater();
}
|
|
|
|
|
Okay.Delete button is in the repater.right?then in the delete button click event you'll get the item index and using that item index delete that object from the viewstate and rebind repeater.is that makes sense?
|
|
|
|
|
im losing the values in textboxs on postback.... i cant check which row im deleting correctly as the values go on postback...
int iddelete;
iddelete = ToInt(e.CommandArgument.ToString());
if (iddelete!=0)
{
}
else
{
int count = e.Item.ItemIndex;
dtdelete.Rows[count].Delete();
dtdelete.AcceptChanges();
Rptdescription.DataSource = dtdelete;
Rptdescription.DataBind();
}
|
|
|
|
|
test-09 wrote: im losing the values in textboxs on postback...
Which values you are loosing?ItemIndex is enough to delete it from ViewState?Is this code working?whats the difficulty you are facing in the above code?
If you are saying about entered values in textboxes, then save that values to the persisting object before rebinding the repeater.
|
|
|
|
|
the last row is deleting if i click on delete of any row... what may be problem
|
|
|
|