Recently I had faced problem asp.net menu control…Especially in chrome browser the asp.net menu control was not displaying properly...then I searched found some code would be useful to resolve my problem..
Here I share the code for those people for resolve this problem….
The below code is working perfectly for me..If you face the same problem try the below code.
Below code solve mostly solve your issues..
if Request.UserAgent.Contains("AppleWebKit") Then
      Request.Browser.Adapters.Clear()
    End If

Some other code I found when I searched….
1.
protected void Page_PreInit(object sender, EventArgs e)
         {
             // This is necessary because Safari and Chrome browsers don't display the Menu control correctly.
             if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
                 Page.ClientTarget = "uplevel";
         }
2.
protected override void AddedControl(Control control, int index)
        {
            // This is necessary because Safari and Chrome browsers don't display the Menu control correctly.
            // Add this to the code in your master page.
            if (Request.ServerVariables["http_user_agent"].IndexOf("Safari", StringComparison.CurrentCultureIgnoreCase) != -1)
                this.Page.ClientTarget = "uplevel";
                        base.AddedControl(control, index);
        }
3.
Add this below code in web.config file to solve the problems…..
<system.web>
    <browserCaps>
<case match="Chrome/(?'version'(?'major'\d+)(?'minor'\.\d+)\.\d+.\d+)\sSafari/\d+\.\d+">browser=Chrome version=${version} majorversion=${major} minorversion=${minor}</case>
    </browserCaps>
</system.web>
4.
In this method you need to create App_Browser folder in solution explorer.. Follow the below steps.
 Right click Solution explore application name and in ASP.Net folder choose App_Browser
 App_Browsers folder and then, for this, Add New Item...
Select "Browser File" and name it Chrome.browsers.
Comment out the default stuff and insert this from the link above…
<browsers>
    <browser refID="safari1plus">
      <controlAdapters>
        <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
      </controlAdapters>
    </browser>
  </browsers


I hop this code will be useful to all.please post your comment with the code wok for you ..It may ueful to someone…Happy coding…….

9:00 PM

Reading and writing XML data in asp.net

Posted by vijay


Introduction:

It’s very interesting when write about XML  an extensible markup language…

Here you are going to see different way to read and write the XML data.
Now I share the simple and easy methods to know about xml read and write.
Its basic question initially to ask about an xml everywhere

What is XML and why use xml?

·         Xml is the universal format for describing and exchange the data.
·         Xml  is self describing and easy to work
·         Xml described how the data is structured.

Read XML Data
By using dataset we can easily read the xml data and easy bind the data in gridview or in dataset
  Dim ds As New DataSet
        ds.ReadXml(Server.MapPath("prod.xml"))

Once we get the data to dataset we can manipulate the data to our needs..
For Each dr As DataRow In ds.Tables(0).Rows
      
 Next

Once the data has set in dataset then we easily bind the data into gridview or in dataset
        grddet.DataSource = ds
        grddet.DataBind()

Write XML data
By using dataset this is way to write XML data.
Dim sqlda As New SqlDataAdapter("select * from products", sqlcon)
        sqlda.Fill(ds, "product")
        ds.DataSetName = "Newproducts"
        ds.WriteXml(Server.MapPath("prod1.xml"))

 Also using xmldocument we can get the data from dataset and we do manipulate or bind the data if the conditions needed..
Dim xmldoc As New XmlDataDocument(ds)
        grddet.DataSource = xmldoc.DataSet
        grddet.DataBind()


For doing manipulation
'Manupulate
        Dim xele As XmlElement
        xmldoc.GetElementsByTagName("products")
        For Each xele In xmldoc.ChildNodes
            If xele.Name = "car" Then
                xele.Value = "100"
            End If
        Next


Conclusion:
From this article you have seen how to read and write XML ,I hope you learn something from this keep reading happy coding




Here I share a bit of useful information as we need for a daily basis, especially for blogger.

Those who needs to record our window screen this article might be great useful to them...
With help of  this software we  do record our windows screen.
So we can easily upload the videos in YouTube or directly embed into our website by using this type of conversion.


It’s having following features.
  • By using selection we record only particluar region
  • File output format has .Avi or .Swf(flash format)
  • Record with audio option
  • Number of tools to edit the recorded video.
  • Easily to convert flash format.
Download