|
Tables is an outdated method.
Use <DIV> tags and float or position them.
Can put DIVs inside DIVs and use CSS Tables for formating.
You can nest a table in a DIV, but DIV is the correct method du jour.
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
thanks alot for your time and reply
I would like to ask you which way is perfect when I
determine the size of tables or DIVs either pixel or the percent
actully that I know is the pixel size will not fit with all browser or computers
Is it true?
thanks alot again
|
|
|
|
|
Hello Sir/Madam,
i am facing problem last two month.
so please you have sent perfect solution.
unable to connect to visual studio's localhost web server.
i tried by reinstall the webdev.webserver from
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727..
but
it is saying 'The application failed to intialize properly (0*c0000007b).
Click ok to terminate the application.
Regards,
Nand kishor
|
|
|
|
|
First, change the subject of your question to something meaningful.
Never, put an email id in place.
Second,
when you replace/re-install WebDev.WebServer.exe, make sure you end all instances of same in task-bar, register aspnet again.
Third, the Error:
The application failed to initialize properly (0x.....)
means
'The permissions aren't setup properly on MSVBVM60.DLL in your Windows System32 folder.'
In most cases adding permissions to this file solves problem. Check this for doing so.
|
|
|
|
|
Hi
I am struggling with updating data from a web page. On the page I have a DetailsView control which is bound to a table in the SQL Server database. I have enabled Editing.
One of the fields in the table is a foreign key to a lookup table (for the Referring Hospital) in the database. I would like to have a DropdownList in the DetailsView so that the user can choose the item.
I have changed the field to a TemplateField and while the field (“HospID”) is still a TextBox the update to database works. For example when I change the LastName and click ‘Update’, the update reflects in the database.
Here is the markup:
<asp:TemplateField HeaderText="HospID" SortExpression="HospID">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("HospID") %>'></asp:TextBox>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("HospID") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("HospID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="LastName" HeaderText="LastName"
SortExpression="LastName" />
However when I replace the TextBox in the EditTemplate with a DropdownList and try to update, the changes do not reflect in the database. Even if I have just changed the LastName.
The markup for the DropdownList is as follows:
<asp:TemplateField HeaderText="HospID" SortExpression="HospID">
<EditItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource_RefHosp" DataTextField="HospShort"
DataValueField="HospID">
</asp:DropDownList>
</EditItemTemplate>
<InsertItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("HospID") %>'></asp:TextBox>
</InsertItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("HospID") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
Even if I just use a basic DropdownList with no databinding the update does not work.
<asp:DropDownList ID="DropDownList_RefHosp" runat="server"
DataTextField="HospShort" DataValueField="HospID">
</asp:DropDownList>
I am stumped here so if anybody can give me some pointers it will be appreciated.
Regards.
Kobus
|
|
|
|
|
You are connected the Dropdownlist by automatically by Database connection wizard. When program starts running the values in Database which you specified is loaded Dropdownlist. Again it will not goto database to retive the values for dropdownlist. So you can't get updated values.
Instaed of that you will write the code in separate method RetriveData() to retive the data from database and add the SqlDataReader values to Dropdownlist.
Call thet method when page load and update button click methods . Take another connection object to for RetriveData() method Open the connection when RetriveData() is called and Close at the method end.
U will get updated list evrytime.
Hope you can do the coding simple try it..
|
|
|
|
|
plz give me the code for copying row from one gridview to another....
for example i have 2 gridviews......
gridview1 and gridview2
each time i click on a button,the data from table based on dropdownlist1 the row is inserted in gridview1....now i want to copy a row from gridview1 to gridview2 each time a new row is added... without overwriting the previous rows in gridview2...
|
|
|
|
|
Seema Rayat wrote: plz give me the code
This is extremely RUDE around here. We are here to help and offer assistance, not just give you code. Show what you have tried, show that you have made an effort, then someone will help.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
sorry......
i m new to this...
actually i have done that how to copy from one radgrid to another...
this is my code..plz can u help me in converting it...
SqlConnection con = new SqlConnection("Data Source=CMA-PC; Initial Catalog= master; Integrated Security=True");
SqlDataAdapter da = new SqlDataAdapter("select * from aa1 where Journal_Name='" + DropDownList1.Text + "'", con);
DataSet ds = new DataSet();
da.Fill(ds);
DataTable dt = ds.Tables[0];
DataRow dr;
dr = dt.NewRow();
GridView1.DataSource = dt;
//GridView1.DataBind();
foreach (GridViewRow r in GridView1.Rows)
{
/* Construct datatable from Existing GridView */
DataRow newrow = dt.NewRow();
newrow[0] = r.Cells[0].Text;
newrow[1] = r.Cells[1].Text;
newrow[2] = r.Cells[2].Text;
newrow[3] = r.Cells[3].Text;
newrow[4] = r.Cells[4].Text;
newrow[5] = r.Cells[5].Text;
newrow[6] = r.Cells[6].Text;
newrow[7] = r.Cells[7].Text;
newrow[8] = r.Cells[8].Text;
newrow[9] = r.Cells[9].Text;
newrow[10] = r.Cells[10].Text;
newrow[11] = r.Cells[11].Text;
/* Add to Datatable */
dt.Rows.Add(newrow);
}
/* Finally Bind the Constructed DataTable to Grid2 */
GridView2.DataSource = dt;
DataBind();
}
|
|
|
|
|
First the newbie mistakes need to be corrected. NEVER hard-code you connection strings in your code, use the web.config file. There is a section for connection strings. NEVER use string concatenation to form to the sql statement and NEVER, EVER use unvalidated values from user input.
If I understand this you want GridView1 and GridView2 to have the same data?
GridView1.DataSource = GridView2.DataSource = dt;
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I want to input below code.
But page occur error.
How can i?
<td> Time & Destination </td>
hi
My english is a little.
anyway, nice to meet you~~
and give me your advice anytime~
|
|
|
|
|
Haha, having trouble atm getting this to display correctly as CP keeps converting it...
You need to replace the "&" with "&" - this is the HTML escape code for an ampersand character. For a full list, see here[^].
|
|
|
|
|
|
Escape codes are a bugger to remember aren't they!
------------------------------------
I will never again mention that I was the poster of the One Millionth Lounge Post, nor that it was complete drivel. Dalek Dave
CCC Link[ ^]
Trolls[ ^]
|
|
|
|
|
Hey...I am new to this MVC 2.0.I just want to know what are the codes to download a File from database using MVC 2.0.I am using ADO.NET Entity Framework.
I am confused with layers of MVC 2.0.It has Domain(Abstract,Concrete,Entity) and WebUI.How I will use this layers to download a file.
Thanks in advance.
|
|
|
|
|
Hi,
I am not sure if this is possible. I am exploring web user controls. I have created a datalist user control (datalist.ascx). I have added this control to my default page. Now I want to bind data to this datalist. I am not sure how to do that. I am testing with user controls and any help will be appreciated.
Here is my code:
default.aspx
<%@ Page Language="VB" MasterPageFile="~/MasterPage.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="Default" title="Untitled Page" %>
<%@ Register Src="datalist.ascx" TagName="datalist" TagPrefix="uc1" %>
<%@ MasterType VirtualPath="~/MasterPage.master" %>;
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<uc1:datalist ID="Datalist1" runat="server" />
</asp:Content>
default.aspx.vb
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim cmd As New SqlCommand("ws_Testimonials")
Try
If dalaccess.Connect = True Then
rs1 = dalaccess.GetDataset(cmd, 60)
dalaccess.Disconnect()
Datalist1.datasource = rs1
Datalist1.DataBind()
End If
Catch ex As Exception
End Try
I get the compilation error that "Error 1 'datasource' is not a member of 'ASP.datalist_ascx'."
Gurus please help.
|
|
|
|
|
Just expose the Datalist of your usercontrol using properties. Once done, they will be accessible in the base page and there you can directly access and define the datasource for it.
|
|
|
|
|
Hi,
I want to log messages in event viewer from my ASP application.
Does anybody have an idea how do it?
Cheers
|
|
|
|
|
ASP or ASP.NET? If it's ASP.NET, you need the EventLog[^] class which contains various members for manipulating the event log. For instance, if you want to log to your own event source (there are certain sources already created such as the Application log and Security log), you'd use:
if (!EventLog.SourceExists("MyCustomSource"))
{
EventLog.CreateEventSource("MyCustomSource");
} Then, you can write to it using:
<br />
EventLog.WriteEntry("MyCustomSource", "This is my event body text", EventLogEntryType.Information); There are various overloads for this method - have a read up to find which is best in your particular case. Note that you shouldn't attempt to create an event source and then use it immediately, as there is a time period that the event source is being created. If you must do this, make sure that you create the event source when the application starts.
You also need to be aware that writing to the event log requires security privileges that your web account may not, by default, have. In this case, the administrator will need to ensure that the web account has privileges to write to the event log.
|
|
|
|
|
Hi all,
I am createing a report in SSRS 2008. When i select the pagebreak option then it is creating multiple tabs for each group.
but I want all the data in the single sheet instead of different tab with page break.
any solution?
Thanks in Adv
Rahul
People Laugh on me Because i am Different but i Laugh on them
Because they all are same.
|
|
|
|
|
rahul.net11 wrote: When i select the pagebreak option then it is creating multiple tabs for each group.
You have not mentioned that which control you are using. Based on this, it looks like it's a List. You have very specific options for page break here. Tried all?
rahul.net11 wrote: but I want all the data in the single sheet instead of different tab with page break.
After reading this, it sounds like, you want a page break during a print and not as such. If so, it will automatically happen based on printing settings (generally page height-width). PageBreak feature is to segregate few data from each other and start the display of them afresh. Looks like it's happening the same for you but your reason to put page break is not so. Read on what 'Page Break' feature is and what it provides.
|
|
|
|
|
hi
how to validate fax number using regular expression validator in asp.net, that should accept
541-000-4444
(541) 000-4444
1-222-000-4444
1 (222) 000-4444
|
|
|
|
|
|
Hi Im using ASP.net / C#
My english is not very good, but i will try my best to explain what i need.
There are 2 questions:
Question 1) I want to be able to know the colour index of a pixel from a GIF format file.
With that I mean, as you know, a gif image file contains a colour palete, which is an array of length 256. Each array item from 0 to 255 contains a colour, and in GIF files, colours can be repeated in different positions. For example, I can have a grayscale palette, which will look something like this [#000000, #010101, #020202, ..., #FEFEFE, #FFFFFF], but in my case, all the colours are the same, lets say red:
[#FF0000,#FF0000,#FF000, ..., #FF0000]. That is perfectly valid in a GIF File, since each pixel is not tied to a colour, instead, it is tied to an index in the colour table. So even if the whole image is red (looks red), the actual bitmap data could be something like this:
(this code is conceptual, not actual C# code)
palete = redPalete; // [#ff0000,..., #ff0000] all red colours
pixelData = [[1,2,3,4,5,6,7,8,9,10 ... 256],
[1,2,3,4,5,6,7,8,9,10 ... 256],
...
[1,2,3,4,5,6,7,8,9,0 ... 256]]; //supose the pixel data is a matrix of colour indexes.
In this example, my image has all possible colours from the palette, but since the palette is all red, the image will look red.
Ok, that is ok, but now my problem, is...
How can I open that external GIF File, and iterate through pixels, retrieving its associated colour index in the palette table instead of the actual colour?? According to the previous example:
int colourIndex = miImage.getPixelColourIndex(0,0);
and i dont want to retrieve the value #ff0000, instead, i want to obtain the value 1.
and if i say:
int colourIndex = miImage.getPixelColourIndex(1,0); //colourIndex should be 2, since [[1,2,3 ....]
¿anyone got the idea of what i need? I need to know the colour index associated with a pixel, instead of the actual colour of that pixel (since several colour indexes can point to the same colour value, in this case red).
Question 2) Question 2 is exactly the opposite case. I want to write an indexed image (and then save it to GIF), according to the colour indexes values, instead of the colour.
That means, i want to do:
myImage.setPixel(0,0,1); //being setPixel(x, y, colourIndex);
i want that instead of saying the actual colour, which could look like:
myImage.setPixel(0,0,#ff0000); // I dont want this, i want to use the index value, not the colour, since my palette will contain all red values.
Please!!! I will sincerely appreciate help with this, I guess there is not a native function to do that, but probably there is a way around it, isnt it??
Thank you for reading and for your help in advance
Alvaro
|
|
|
|
|
Hey guys, how could it be? I dont even know PHP and I achieved to do what Im asking for in half an hour. How could it be that in .NET there is no way around it?
Any help?? (please!
|
|
|
|
|