|
Hi frnds,
i want a function to inform user's that when he is entering minus sign(-) at starting of the text alert message to be given
Thnks in advance
Pushpa
|
|
|
|
|
Try this,
if (MY_TEXT.indexOf('-') == 0){
alert(MY_MESSAGE);
}
|
|
|
|
|
thnks
|
|
|
|
|
I have to create subrows in a gridview
ex
1.First Heading
a
b
c
2.Second Heading
d
e
f
I want to show and hide the sub rows on click on heading on click on heading
Thanks in advance
Gaurav
|
|
|
|
|
How can i show the events inside a usercontrol in the properties window of the page where i am using the usercontrol?
[Browsable] is not working.Events are accessible from the design view but not showing in the events section of properties window.How can i do that?
arun
|
|
|
|
|
If you have created a Public Event it automatically show up in the Property Window under events section. There is no need to set the [Browsable] Attribute to the event.
Check where the reference is referring the right control.
|
|
|
|
|
My class is like this
public partial class ClassName: System.Web.UI.UserControl<br />
{<br />
[Browsable(true)]<br />
public event EventHandler ibtnApply_Click;<br />
......<br />
}
But its not coming in the page where am using this usercontrol.References are correct.hw can i do that?
arun
|
|
|
|
|
Sorry Arun. I am not sure about that. I have used UserControl with custom events. But I didn't found any problem unless, it is not refreshed properly in the Webpage's design mode. Drag & Drop it again and see.
|
|
|
|
|
The below code is meant to get data from a db, display the first row, sleep for 2 seconds then display the second row. Can anyone spot what i may have done wron???
many thanks.
Dim ds As DataSet = New DataSet
ad.Fill(ds, "tblcustomers")
Dim dtab As DataTable = ds.Tables(0)
Dim dtabclone As DataTable = dtab.Clone()
Dim drow As DataRow = dtab.Rows(0)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtabclone
GridView1.DataBind()
'gridview1
System.Threading.Thread.Sleep(2000)
drow = dtab.Rows(1)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtab.Clone
GridView1.DataBind()
|
|
|
|
|
solarthur01 wrote: The below code is meant to get data from a db, display the first row, sleep for 2 seconds then display the second row. Can anyone spot what i may have done wron???
Your are confused & you are not aware of what you are doing. The code (I am not sure how it works) executes in the Server-side, and the final result would be the output of
solarthur01 wrote: Dim ds As DataSet = New DataSet
ad.Fill(ds, "tblcustomers")
Dim dtab As DataTable = ds.Tables(0)
Dim dtabclone As DataTable = dtab.Clone()
Dim drow As DataRow = dtab.Rows(0)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtabclone
GridView1.DataBind()
'gridview1
System.Threading.Thread.Sleep(2000)
drow = dtab.Rows(1)
dtabclone.ImportRow(drow)
GridView1.DataSource = dtab.Clone
GridView1.DataBind()
I think, you should try it with JavaScript + HTML Tables
|
|
|
|
|
the above code works (partially). it only displays one record. It is meant to display one record sleep for 2 seconds, then display the next record(as the code specifies).
|
|
|
|
|
I have built a online photo album that will feature pics of great looking american women
with a chat box that talks with everyone. What I want to build is a message box that you hit a send button and send a message to the corresponding pic.
Any suggestions or where to look?
|
|
|
|
|
in my cs file of the page i have added
Button1.Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=edit',null, 'status:no;dialogWidth:570px;dialogHeight:500px;di alogHide:true;help:no;scroll:no')");
this works quite gud................. lookup page opens as a dialog
But i have two buttons on Lookup page,,,, when i click any the lookup page is opened as a web page not as a dialog.......... i dont need to open it again ........ i have simply added some functionality to the onclick events....
why the dialog button opens web page instead of refreshing itself
Thanx
|
|
|
|
|
In the lookup page's design view give the below tag inside head tag.
<base target="_self" />
Then try again.
arun
|
|
|
|
|
i did so but i still have the same problem........this donot solve it
|
|
|
|
|
it works .........there was an error in my code due to which the statement was not working
|
|
|
|
|
now i am facing another problem
i open the dialog form Page1.aspx using
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Now i have an HTML control (input button) in its Clickevent i want to set the value of TextBox1 of the Page1 but when i write
window.opener.document.getElementById('TextBox1').value='ads';
i get the error
document.opener.document is null or not an object
i have also tried
window.opener.parent but it also gives error
How can i do this
|
|
|
|
|
Instead of opener use window.dialogArguments .
LinkButton2 .Attributes.Add("onclick", "window.showModalDialog('Lookup.aspx?new=new', null, 'status:no;dialogWidth:555px;dialogHeight:575px;di alogHide:true;help:no;scroll:no')");
Pass the value of textbox in place of null in the showModalDialog method(second argument).And then use window.dialogArguments from dialog.
Arun J
|
|
|
|
|
Is there any way to get the final dimensions of an ASPX page before it is rendered? I don't mean the size of the browser window (Request.Browser.ScreenPixelWidth...). I mean the complete size of the ASPX page, counting areas that can only be reached via scrollbar -- as in, to get a page to render without scrollbars in the browser I would have to expand my browser viewing areay to X-by-Y pixels...
Or maybe I should explain what my end game is: I want to create a div that overlays my entire ASPX page under certain conditions. When I make an absolute div positioned at 0,0 and sized to 100%, it only creates a div the size of the browser client area. So if my page is scrollable and the user scrolls, I get a nasty cutoff-line where the div ends.
Thanks.
modified on Wednesday, January 30, 2008 5:06:34 PM
|
|
|
|
|
No, that is not possible. The size of the page can only be determined when it's displayed in the browser, and the size can change at any time while it is being displayed if the user changes the settings in the browser.
The size of the page can depend on many variables that you have no control over, like browser type and version, operating system type and version, desktop theme, display settings, font smoothing settings, browser text size, browser zooming, et.c...
Experience is the sum of all the mistakes you have done.
|
|
|
|
|
Instead of using absolute in your css, can you use fixed ?
|
|
|
|
|
How cross-browser compatible is that mode? On some website somewhere I read that "fixed" mode exhibits very flaky behavior in IE. I'm running IE 7 and Firefox 2.0, but my client has over 400 clients of their own that use the system, so you know someone out there is going to have some really archaic browser.
I was able to center a small div regardless of scroll position using "fixed" in both IE7 and FF2. However, when I wanted to cover the rest of the screen in a 50% transparent gray cover to make the other div more visible, I encountered an IE 7 issues for which I found a bizzare work-around. The div tag:
<br />
<div runat="server" id="divTest" style="position:fixed; left:0px; top:0px; width:100%; height:100%; background-color:gray; filter:alpha(opacity=60); -moz-opacity: .60;"></div><br />
...seemed to work OK when I had not scrolled the page. However, when I scrolled the page to the bottom and clicked my button to show the div, only the upper half of the screen was covered. So much for "100%". HOWEVER, when I set the width/height styles in my CODE-BEHIND INSTEAD:
<br />
divTest.Style.Add("height", "100%");<br />
divTest.Style.Add("width", "100%");<br />
...then I do get 100% coverage, regardless of page scroll position.
WHATEVER!
|
|
|
|
|
hi,
what is the function of PostBackurl ?
i drag the Button1 Default.aspx and in Default.aspx.cs I intilize a
int i; and
protected void Button1_Click(object sender, EventArgs e)<br />
{<br />
<br />
Button1.Text = "" + i; i++;<br />
}
after site run ,when i click on the Button1 ,Button1.Text show '0'.its ok........ but when i click again it still Button1.Text show '0'.
but i want whenever i press the button1 then int i update every time
.......
|
|
|
|
|
zeeShan anSari wrote: what is the function of PostBackurl ?
MSDN[^] not working in Pakistan today? Or did it just not occur to you to read the documentation?
zeeShan anSari wrote: protected void Button1_Click(object sender, EventArgs e)
{
Button1.Text = "" + i; i++;
}
Where is i defined? Is it a class-level variable? Unless you cache the value of this variable between postbacks, for instance by using ViewState , it will be initialized to 0 on every postback.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
i initialized under :
public partial class _Default : System.Web.UI.Page
then how i can increment the int i value
|
|
|
|