.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Post New Web Links

Displaying a Text using Web.config

Posted By:      Posted Date: October 12, 2010    Points: 0   Category :ASP.Net
 

hi...am a beginner...actually i created a table  using html in asp.net....

i wanted to display a title text to that table using Web.Config...

i can use that by using <title> tag in html , but i wanted to know how to display a text (title) using Web.config....

Kindly help ...Thanks in advance...




View Complete Post


More Related Resource Links

Displaying transparent text using TextOut

  
Hi, I'm currently working on a C# project that displays transparent windows (like splashscreens) using Windows Forms. I've been using a class that allows me to call GDI Win32 functions such as UpdateLayeredWindow(), GetDC(), TextOut()... I can show a transparent PNG, it's ok but when I want to add a transparent text with TextOut it works but doesn't follow the form. In the TextOut function, I've tried to specify the HDC of the current form using e.Graphics.GetHdc() without success... Is there a way I can draw my transparent text so it follows the transparent form ? Here is my code, written within the Form_Paint method (private void Form1_Paint(object sender, PaintEventArgs e)). The HDC for the TextOut method used here is null so it draw within the screen DC. IntPtr Hdc = API.GetDC(IntPtr.Zero); IntPtr memDc = API.CreateCompatibleDC(Hdc); IntPtr hBitmap = IntPtr.Zero; IntPtr oldBitmap = IntPtr.Zero; try { //Display-image Bitmap bmp = new Bitmap(backgroundImage); hBitmap = bmp.GetHbitmap(Color.FromArgb(0)); //Set the fact that background is transparent oldBitmap = API.SelectObject(memDc, hBitmap); //Display-rectangle Size size = bmp.Size; Point pointSource = new Point(0, 0); Point topPos = new Point(this.Left, this.Top); e.Graphics.GetHdc() //Set up blending options API.BLENDFUNCTION blend = new API.BLENDFUNCTION(); blend.BlendOp = API.AC_SRC_O

Displaying Rich text with formatting in RDLC file

  
Hi, I want to display my rich text with formatting in RDLC file. Can anyone please help me with the way out for that? Thanks & Regards, Subalakshmi Vijayarajan.

RTF documents not displaying in rich text box (word pad) ,but able to open using MS office Word

  

hi there ,

my application has a rich text box ,where rtf files are opened and processed . 90% of the time am able to load this with out any trouble . but rest 10% of the rtf files are not displayed in the rich text box (though they are able to load )

And also i have observed a weird behavior : IF the number of pages of this rtf files are stripped off (from  100 to 10 ) the same are displayed .

Is there any limit for the the number of pages in RTB (rich text bOx) .

thanks in advance 

jame


Gridview displaying text not link

  

I have a gridview that is bound to a table in my database.  The second column I'm grabing from the table has the HTML code to create a link.

ex. <a href="yahoo.com"> yahoo</a>

When I bind it to my grid it shows me this text instead of just the word "yahoo" that is a link.

This is my gridview

<asp:GridView ID="grd" runat="server" Visible=true  BackColor="White" BorderColor="ActiveBorder" BorderStyle="Solid" BorderWidth="0px" CellPadding="4" 
ForeColor="Black" GridLines="Vertical"                                    AutoGenerateColumns="False" allowsorting="True"                 onrowdatabound="grd_RowDataBound">
                <Columns>
		      <asp:BoundField DataField="country" HeaderText="" />
		      <asp:BoundField DataField="name" HeaderText="" />
      		</Columns>              
      </asp:GridView>


Thank you for any help



Small problem with displaying custom calendar cell text from db in Safari

  

using VS2010

I'm using the calendar control to create a simple event calendar. I want to add a small bit of custom text just below the date of any cell that contains an event on that date.

The code:

protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
    {
      string connString = ConfigurationManager.ConnectionStrings["CalendarConnectionString1"].ToString();
      SqlConnection myConnection = new SqlConnection(connString);
      SqlDataAdapter myAdapter = new SqlDataAdapter("GetEvents", myConnection);
      DataSet myDataSet = new DataSet();
      myAdapter.Fill(myDataSet, "Table");
      myConnection.Close();
      //If the month is CurrentMonth
      if (!e.Day.IsOtherMonth)
      {
        foreach (DataRow dr in myDataSet.Tables[0].Rows)
        {
          if ((dr["Date"].ToString() != DBNull.Value.ToString()))
          {
            DateTime dtEvent = (DateTime)dr["Date"];
            if (dtEvent.Equals(e.Day.Date))
            {
              e.Cell.BackColor = Color.MediumAquamarine;
              Label label = new Label();
              e.Cell.Controls.Add(label);
              label.Text = "</br>";
              label.Text += dr["Title"].ToString();              
            }
          }
       

Displaying text in label not happening

  

Hi, I have an if statemenet, in the 1st branch, I execute a datareader and want to update a label with the count number, the else branch will freeze the execution for 1 minute (I use Thread.sleep)

In both branches, I have a stamenet to update the content of the lable, this is not happening inside the loop, If, label is updated by the end of the sub, here is the simplified piece of code

 While rdr.Read()
        
             If imailBacthcount <= CInt(txtBatcCount.Text) Then
    do something
    lblCountEmailSent.Content = "count : " + iCount.ToString + " last Sent to "
   ELSE
   lblCountEmailSent.Content = iCount.ToString + " sent, waiting for next 5"
                Thread.Sleep(CInt(txtBatchPeriod.Text) * 60 * 1000)
end while

It is only updated at the end as "10 sent, waiting for next 5"

Thanks in advance


Displaying text in label not happening

  

Hi, I have an if statemenet, in the 1st branch, I execute a datareader and want to update a label with the count number, the else branch will freeze the execution for 1 minute (I use Thread.sleep)

In both branches, I have a stamenet to update the content of the lable, this is not happening inside the loop, If, label is updated by the end of the sub, here is the simplified piece of code

 While rdr.Read()
        
             If imailBacthcount <= CInt(txtBatcCount.Text) Then
    do something
    lblCountEmailSent.Content = "count : " + iCount.ToString + " last Sent to "
   ELSE
   lblCountEmailSent.Content = iCount.ToString + " sent, waiting for next 5"
                Thread.Sleep(CInt(txtBatchPeriod.Text) * 60 * 1000)
end while

It is only updated at the end as "10 sent, waiting for next 5"

Thanks in advance


Displaying data from Enhanced Rich Text field

  

Iam using a custom list, one of the column datatype of the list is Multiple lines of text with type of text to allow as Enhanced Rich Text. Users in my site can copy any type of data and paste in that list coulmn. I need to display the list data in a webpart same as how it is copied. But after querying the list iam getting all the Style tags. How to avoid this.

For example, i copied the following text in the coulmn as below:

One advantage of using the SPGridView control in SharePoint-based solutions is that it has been integrated with the cascading style sheets that are built into Windows SharePoint Services 3.0. Also, the SPGridView control is heavily.
But after quering the list while displaying, following is the output iam getting. How to avoid the tags:

<div class=ExternalClass70B2A73EC47547F98E72395A66BC565C><div>One advantage of using the <strong>SPGridView</strong> control in SharePoint-based solutions is that it has been integrated with the cascading style sheets that are built into Windows SharePoint Services 3.0. Also, the <strong>SPGridView</strong> control is heavily </div></div>

Adding watermark or text to images on uploading or displaying

  

Is there a way to process images once uploaded to my asp.net site, to put a watermark or some text across the image to copyright the images? I would like to do this server-side if possible.

The other option I have discovered here (http://wpglamour.com/how-to-watermark-all-your-uploaded-images/) would be to store the images as they are on the server, but to manipulate the display so it appears the image is watermarked . However, this solution is in PHP. Does anyone know a good PHP to VB.NET translator?! Or does anyone have a good suggested link, idea or code? Or can I add PHP to my ASP.NET site?


displaying the text of a binary field in management studio

  

I have an xml string stored in a binary field of type 'image' created in C# as follows:

-----------------------
string xmltext="<root>some xml text</root>";
System.Text.UTF8Encoding encoding = new System.Text.UTF8Encoding();
byte[] xmltext = encoding.GetBytes(sXML);
-----------------------

I than use ADO to write to a table, storing in a column of type: image.
Everything is fine, but now I want to view original xml string.
Executing the 'select xmldata from sometable' shows the field value as a long string of numbers (I assume the binary data).
Can anyone advice how I can display the orginal text value in management studio?


Baruch Barness


Clean Web.Config Files (VS 2010 and .NET 4.0 Series)

  
.NET 4 includes a new version of the CLR, and a new .NET 4 specific machine.config file (which is installed side-by-side with the one used by .NET 2, .NET 3 and .NET 3.5).

The new .NET 4 machine.config file now automatically registers all of the ASP.NET tag sections, handlers and modules that we've added over the years, including the functionality for:

.ASP.NET AJAX
.ASP.NET Dynamic Data
.ASP.NET Routing (which can now be used for both ASP.NET WebForms and ASP.NET MVC)
.ASP.NET Chart Control (which now ships built-into ASP.NET V4)
What this means is that when you create a new "Empty ASP.NET application" project in VS 2010, you'll find that the new default application-level web.config file is now clean and simple:

Displaying SharePoint lists in Web Parts

  
When you create a built-in or custom list in Microsoft Windows SharePoint Services, Windows SharePoint Services creates a Web Part, a basic building block of a SharePoint site, to display that list. These Web Parts are called List View Web Parts. Windows SharePoint Services stores List View Web Parts in the site collection Web Part gallery. (The site collection Web Part gallery is the most central gallery of Web Parts for a work group. By default, the gallery name is the name of the site, such as "Our Team Site Web Part Gallery." )

Displaying Row Details Tooltip on GridView using JQuery

  
Continuing exploring JQuery! I decided to implement a feature to display some kind of details related to a row displayed on GridView. For example when displaying employees details on GridView some information might not fit in the GridView because it will make it huge and wide. These infomration can be diplayed as Tooltip. Or when you want to display a picture and some kind of formated text to be diplayed as tooltip when mouse hover on the image.

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

  
Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!

Displaying Data using ASP.NET 2.0 Repeater and C#

  
This tutorial will show you how to display data using the .NET Repeater Control, ASP.NET 2.0 and C#.NET


The Repeater control is a powerful tool and is easy to use.

First, you will need to import the System.Data.SqlClient namespace.

AutoCompleteStringCollection for text box in DataGridView 2.0

  
I have been searching for a way to have autocomplete in a DataGridTextBox
object. There does not appear to be an obvious way to do this like you would
for a TextBox outside of a grid using the AutoCompleteCustomSource. Any
thoughts on how I can add this collection? :)

Built-in Functions - Text and Image Functions in SQL Server

  
Text and image functions operate on TEXT, NTEXT and IMAGE data types. These data types are deprecated with SQL Server 2005 and should be replaced by VARCHAR(MAX), NVARCHAR(MAX) and VARBINARY(MAX) when possible. Alternatively you can also consider storing large string values using XML data type. Text and image functions are nondeterministic.

Future versions of SQL Server will not support TEXT, NTEXT and IMAGE data types. Columns with TEXT / NTEXT data type do not support commonly used string functions such as LEN, LEFT, RIGHT, etc. Furthermore, due to the large size of TEXT data you''re likely to see performance issues if you store such data in the database. However, at times you can''t help but use the TEXT / NTEXT / IMAGE data types (for example when supporting 3rd party databases when you cannot change the schema) - this is when text and image functions come in handy.
Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend