|
hifiger2004 wrote: After changing all the links, the problem is in the maintenance, I think. What will happen if I'm going to debug on something locally in my asp.net files within my machine, since the links of all pages has to be changed to this - "http//www.domainname..." ?
Which is why I said, make all your links pick up the absolute path from a single property, which you can then easily change as needed.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
That's completely wrong! SEO has nothing to do with absolute URLs. Even if it were true, the URL he suggested is not workable.
|
|
|
|
|
Hi Rama,
You mean to say that either putting the complete url like href="http://www.domainname..." and without the domain name the results are still the same?
So for my ASP.Net pages maintenance purposes, no need to change all the links by adding http://www.domainname..." ?
Because, the way I understand the SEO is that, once you have a complete url, then the SEO engine can see it(crawl).
What's the best way to do it for my asp.net maintenance purposes and for our SEO, what can you suggest?
hifiger2004
|
|
|
|
|
Yes, an address with or without domain name, the link will have no effect on SEO. Of course the link should not be broken. If you continue using relative URLs, you will be ok.
|
|
|
|
|
Would be helpful if I'll use the canonicalization?
hifiger2004
|
|
|
|
|
hi all ,
I have already developed a website which is a finance portal.In the home page I have showcased data related to markets ((similar to any finance portal).I have left some empty zones to fill it with ad images.I have a separate Ad management application where I will upload ad images(jpeg,gif,bmp etc) and store it in the DB table.The ad management accesses data from another database.I want to pick a sample Ad image and put it in the homepage in the zone already created in a dynamic manner(coding).I dont have any CMS like MOSS.Can anyone let me know how it can be done?
note:When i create a ad I specify in which page it must appear.In this case it is home page along with when it should appear etc.
Thanx in advance.
T.Balaji
|
|
|
|
|
I think you can try for ADRotator control. Just create one HTTPHandler which might write the xml that AdRotator consumes from the Database or by any means that fits your need and place the control on the empty space.
You can apply logic on the Handler to ensure the proper data is fetched from database.
Hope you got the logic..
|
|
|
|
|
Hi All,
How to improve the Website Performance.What are the things need to make in mind, to improve Website.Please give me suggestion.
As my website is General Architecture, i,e 3 Tie
1) User Control and Default page.
2)Businees Logic DLL
3)DataBase Logic DLL.
Can please suggest how to improve the performance the website.
Thanks in Advance.
JohnDas
|
|
|
|
|
Johndas wrote: Can please suggest how to improve the performance the website.
Improve the code. I'm not sure what else you were hoping to hear. Your most likely bottle necks are things like how often you hit the database, what you store in the sesion, etc. Your other option is to buy bigger servers and more of them.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
In addition to that you can compress the output using GZip / Deflate Compression techniques. Most of the modern browser supports compressed responses to improve the response time.
Also remove unnecessary postback... make modular pages. Use AJAX to request only the part that user modifies (with minimal Request/Response).
Cache static pages/scripts/css/images in browser, so that it wont be called for every requests.
Hoping this help you.
|
|
|
|
|
Hi
I have an asp.net gridview in which for each row i need to display a tooltip. the tooltip is another gridview (the tooltip gridview will have the related data of the row which is mouse hovered. Can any one please help how to do this ..?
Thanks in advance
Naina
Naina
|
|
|
|
|
You'd have to define a tooltip as a grid view and bind it to it's data source in the itemdatabound event.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Thanks for the reply. can you please a sample code please?
Regards
Naina
Naina
|
|
|
|
|
Christian Graus wrote: You'd have to define a tooltip as a grid view
CG, intellisense tells me that tooltip property for the gridview is a string. Am I missing out on something? Is there a way to set a control as a gridview tooltip?
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
He wants to set it up per row, so I'm imagining there's an HTML way to do that, which he'd have to do in his own template, and either embedd a gridview in there, if that's possible, or build a string and assign it to the value for that row.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
That one went over my head.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
You can have a hidden div containing the gridview that will be shown as tooltip. Then in the RowBound event, you can bind the tooltip gridview. Then add a javascript method as mouseover (or something like that) event handler for the gridview in the page. This javascript would should display that div at the mouse location. You will also need another event handler to hide the div when mouse is out of the row.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
As per my understanding with what you have told, i will take seperate div and inside div add gridview2(keeping in mind this is not a nested gridview)
on row databound of gridview1 i will bind the gridview2 the related data of the row from database. and on mouse hover call a javascript function which will make the div visible and show as tooltip. i will try this and will let you know the result how fas i could succeed this.
Regards
Naina
Naina
|
|
|
|
|
Hi
I tried with the way told , but on mouse hover the grid is showing the last binded values but not the corresponding values of the row.
Below is how i have done
<asp:Gridview id = parentgridview>
bound the columns
<Gridview>
<div>
<gridview id ="tooltip">columns</gridview>
</div>
on rowdatabound of parentgridview()
{
tooltip.datasourse = colcollection;
tooltip.databind();
e.row.attributed.add("onmouseover",Showtooltip()");
}
This is what i have done.
Regards
Naina
Naina
|
|
|
|
|
Following should explain what I meant:
<pre><div>
<asp:GridView ID="gridView" runat="server">
</asp:GridView>
<script type="text/javascript">
function ShowToolTip(email){
document.getElementById("emailCell").innerText=email;
document.getElementById("tooltip").style.display="block";
}
function HideToolTip(){
document.getElementById("tooltip").style.display="none";
}
</script>
<div id="tooltip" runat="Server" style="display: none;">
<table id="tooltiptable">
<tr>
<td id="emailCell">
</td>
</tr>
</table>
</div>
</div></pre>
and in cs file:
<pre> List<string> email = new List<string>();
protected void Page_Load(object sender, EventArgs e)
{
gridView.RowDataBound += new GridViewRowEventHandler(gridView_RowDataBound);
email.Add("a@b.com");
email.Add("s@b.com");
email.Add("d@b.com");
email.Add("f@b.com");
email.Add("g@b.com");
List<string> lst = new List<string>();
lst.Add("a");
lst.Add("s");
lst.Add("d");
lst.Add("f");
lst.Add("g");
gridView.DataSource = lst;
gridView.DataBind();
}
protected void gridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "return ShowToolTip('" + email[e.Row.RowIndex] + "');");
e.Row.Attributes.Add("onmouseout", "return HideToolTip();");
}
}</pre>
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
Hi
Thanks for the reply and sorry for the late reply.
By the code you have given i understand that you are displaying the emailid which is a text as tooltip.
"e.Row.Attributes.Add("onmouseover", "return ShowToolTip('" + email[e.Row.RowIndex] + "');");"
But ratherthan email id my requirement is to show a gridview as tooltip. If this is not possible i need to see an alternative for displaying the gridview as child of that particular row.
Regards
Naina
Naina
|
|
|
|
|
currently i m using asp.net 2.0 with sql server 2000.
while executing the below coding....
SqlTransaction trans = null;
trans = conn.BeginTransaction();
sqlCmd = new SqlCommand("INSERT INTO A(...) VALUES (...)", myCon.ReturnConnection());
sqlCmd.Transaction = trans;
sqlCmd.ExecuteNonQuery();
sqlCmd = new SqlCommand("SELECT IDENT_CURRENT('A')", conn);
int New_AutoID = int.Parse(sqlCmd.ExecuteScalar().ToString());
sqlCmd.Dispose();
trans.commit();
i m getting the below error
ExecuteScalar requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized.
help me plz.. i m trying to fetch the inserted records autoid using transactions. how can i achieve it?
- Karan
|
|
|
|
|
Karan_TN wrote: sqlCmd = new SqlCommand("SELECT IDENT_CURRENT('A')", conn);
This recreates the command object, this losing all your previous settings. I therefore assume this line has the error because you need to do:
Karan_TN wrote: sqlCmd.Transaction = trans;
again
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
CODE PROJECT ROCKS !!
|
|
|
|
|
I have about 1000 page of images scanned from a directory. I have to convert them to records in a sql server table with following fields: Name, Address, Phone. Is it possible to do it? I want to display the results in an ASP.NET page.
Does anybody know how to do it? Where should I be looking?
|
|
|
|