|
You might want to try giving your DIV the CSS attribute of overflow:auto; .
I hope this helps.
|
|
|
|
|
Can someone tell me please how can I change the location of a div when a page loads?
I need to change the location on the page of the div. I tried to use java script but i couldn't manage. Thanks infront
|
|
|
|
|
Does your DIV have an ID attribute? If so, if you want to move it using JavaScript, you could put the following code in the BODY section of the web page. Or, if you wanted to have the JavaScript in the HEAD section, you could turn the code into a function and have it called in the OnLoad event of the page.
<br />
<script type="text/javascript"><br />
myDiv = document.getElementById("theDivID");<br />
myDiv.style.left = fillIn+ "px";<br />
myDiv.style.top = fillIn+ "px";<br />
</script>
(Note, replace both fillIn with integers and theDivID is the actual ID of the div)
I hope this helps.
modified on Sunday, March 30, 2008 3:59 AM
|
|
|
|
|
And how can i call a function in the onload of the page code and pass the variables?. i tried various ways but with no results. I am still a beginner in javascript so i m new to its funcitonality
|
|
|
|
|
Where are you getting the new left and top values for the DIV tag? (Eg, inside of the ASP.Net page's code, or through JavaScript?)
If you are getting the values through ASP code, you won't have to use any JavaScript; just add the runat="server" attribute into the DIV tag and change the Left and Top values through your ASP code.
I hope this helps.
|
|
|
|
|
I am getting the values thorugh code. How can I pass them through ASP code. I tried to do the following but with no success.
*runner is the name of the div
runner.Style.Add("left", xpos.ToString());
Thanks for your help
|
|
|
|
|
I think the code that you will want to use is:
runner.Style.Item("left") = xpos.ToString() + "px";
Note: The code that I have given you might not compile correctly; I haven't done a lot of work in C#.
Also, in your CSS code for the DIV, have you set it's position attribute to absolute?
position:absolute;
I hope this helps.
|
|
|
|
|
My webhost specification say that they have support for both Asp.net-mssql and php-mysql. I have designed the pages in Asp.net and now I want to have a blog in it. Can I use Wordpress in the middle of an Asp.net site? just by giving a "link" the Php blog page? will that work?
Thanks.
|
|
|
|
|
Yes, yes it will. (PS, ask PHP questions in Web Dev)
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
Is any reporting tool other than crystal report. in asp.net 1.0 or asp.net 2.0
Thanks!
|
|
|
|
|
Not necessary that you need a extra reporting tool integrated into the framework. Microsoft has provided few other solutions to the same problem. You may be interested in the following link. Check this
Designing-and-Developing-Reports-in-ASPNET-20[^]
Report Viewer[^]
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Just a quick question. Is it possible to store a control in the database such as <asp:label id="label1" runat="server" text="label1"></asp:label> into a database and render this on the page request?
|
|
|
|
|
You can store ASP.NET markup anywhere you want, including in a database. Controls can be generated dynamically using the Page.ParseControl[^] method.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
sir,
How to register custom dll into report.rdlc(report viewer)?
and how to custom function in to report.rdlc ?
plz send me reply
Thanks & Regards
Lav Naphade
lav naphade
|
|
|
|
|
lav naphade wrote: How to register custom dll into report.rdlc(report viewer)?
and how to custom function in to report.rdlc ?
Answers to these questions can be found by reading the Reporting Services documentation[^].
BTW, this question has nothing to do with ASP.NET. The ReportViewer component only provides a means of presenting a report. All logic is contained in the report definition which is stored on the Report Server. Reporting Services questions should be asked in the SQL forum.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
hi all,
i use following code for accessing the data from an access file:
public partial class _Default : System.Web.UI.Page<br />
{<br />
OleDbConnection connect = new OleDbConnection();<br />
OleDbDataAdapter dbadapter = new OleDbDataAdapter();<br />
OleDbCommandBuilder dbbuilder = new OleDbCommandBuilder();<br />
DataTable dbtable = new DataTable();<br />
int cntr=0;<br />
-------------<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!IsPostBack)<br />
{<br />
ViewState["row"] = 0;<br />
}<br />
connect.ConnectionString =<br />
@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\temp\xtreme.mdb";<br />
connect.Open();<br />
<br />
<br />
}<br />
-------------<br />
protected void Button3_Click(object sender, EventArgs e)<br />
{<br />
cntr=(int)ViewState["row"];<br />
dbadapter = new OleDbDataAdapter("select * from employee", connect);<br />
dbadapter.Fill(dbtable);<br />
if (cntr < 15 && cntr>=0)<br />
{<br />
cntr++;<br />
Label5.Text = "" + (cntr+1) + ". " + dbtable.Rows[cntr]["First Name"].ToString()+ " " + dbtable.Rows[cntr]["Last name"].ToString();<br />
ViewState["row"] = cntr;<br />
}<br />
}
but i dont know that how i can get the bmp image from this access file..........
i try as:
Image1.ImageUrl = "" + dbtable.Rows[cntr]["Photo"].ToString();
but fail.......
|
|
|
|
|
Hi,
I am using a master page with all my normal .aspx files. How do I dynamically add javascript files to the head part of each .aspx page seeing that not all pages will use javascript?
What I mean is how would I add the following dynamically:
<script type="text/javascript" src="myjs.js"></script>
I use HtmlLink and HtmlMeta to set the link and meta tags dynamically, but how do I dynamically add script tags? I thought that there would be something like HtmlScript?
Thanks
Brendan
<div class="ForumMod">modified on Saturday, March 29, 2008 1:47 PM</div>
|
|
|
|
|
Use the RegisterClientScriptResource[^] method of the Page.ClientScript object to inject a script reference. Do this in your Master page.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
HtmlTextWriter class is used to render the HTML to browser. This class is used to write the elements, attributes for different types of markup. Try using the below code(overide the render method of the page) to write the SCRIPT element to the page. Hope it works.
Protected Overrides Sub Render(ByVal writer As HtmlTextWriter)
writer.AddAttribute("type", "text/javascript")
writer.AddAttribute("src", "myjs.js")
writer.RenderBeginTag(HtmlTextWriterTag.Script)
MyBase.Render(writer)
writer.RenderEndTag()
End Sub
- Regards - J O N
A good thing is a bad thing if it keeps you from the best thing. - Dr. Adrian Rogers
|
|
|
|
|
Hi,
Question:
Case 1: There are many C# client applications (eaxctly one C# windows application running on exactly one client machine, so cumulatively it many many client applcations) and one asp.net web server..
All these clients interact with web server independently..
Case 2: Same as case 1, many client applications, one web server but one difference.. There is a web service in between..
Which case has the best architecture and why???
|
|
|
|
|
Hi,
I have master page Website.master, and a Default.aspx that uses this master page. I will need to set the meta tags of each page dynamically. This was how I normally do it, but for some or other reason it does not work now:
Website.master.cs
public HtmlHead PageHeader
{
get { return (HtmlHead)Page.Header; }
}
public string MetaKeywords
{
set
{
HtmlMeta keywords = new HtmlMeta();
keywords.Name = "keywords";
keywords.Content = value;
PageHeader.Controls.AddAt(2, keywords);
}
}
Default.aspx.cs
Master.MetaDescription = "TEST";
The error that I keep on getting is:
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I have no idea what I am doing wrong here??
Thanks
Brendan
|
|
|
|
|
hi
How the availability of name is checked so much fast ?
I was registering into a website so with in no time it gave me a reply that name is available/not available ..
According to me ...Ajax played the role hear but how ?
thank you
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
Hi,
have a look at this control of asp.net ajax control toolkit. it may give you some idea how this thing can happen. http://www.asp.net/AJAX/AjaxControlToolkit/Samples/AutoComplete/AutoComplete.aspx
Faraz Shah Khan
MCP, MCAD.Net
Blog
|
|
|
|
|
Linkety[^]
Brad
Australian
The PHP MVP
- Christian Graus on "Best books for VBscript"
A big thick one, so you can whack yourself on the head with it.
|
|
|
|
|
hi everyone,
I'm working on a making a Spanish translated version of a website and I need to generate Spanish alphabets in place of English alphabets which are being generated like this. Basically what I wanna know is the STARTING VALUE OF THE FIRST SPANISH ALPHABET IN UTF32.
Thanks in advance
protected void GenerateAlphabetPagingFields()<br />
{<br />
TableCell cell = new TableCell();<br />
AlphabetPagingTable.Rows[0].Cells.Clear();<br />
cell.ColumnSpan = 2;<br />
treeviewDIV.Visible = true;<br />
Table tab = AlphabetPagingTable;
if (tab != null)<br />
{<br />
for (int i = 65; i <= (65 + 25); i++)<br />
{<br />
<br />
<br />
LinkButton lb = new LinkButton();<br />
<br />
lb.Text = Char.ConvertFromUtf32(i) + " ";<br />
<br />
lb.CommandArgument = Char.ConvertFromUtf32(i);<br />
<br />
lb.CommandName = "AlphaPaging";<br />
lb.Click += new EventHandler(AlphabetPagingLink_Click);<br />
cell.Controls.Add(lb);<br />
tab.Rows[0].Cells.Add(cell);<br />
Label lbl = new Label();<br />
lbl.Text = " ";<br />
<br />
lbl.Font.Underline = false;<br />
TableCell td = new TableCell();<br />
td.Controls.Add(lbl);<br />
<br />
tab.Rows[0].Cells.Add(td);<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|