|
A TD is not going to fall below another TD, it is what makes it a table. The TDs are shrinking down to the smallest they can go. As an alternative try using DIV tags I think it will get you a bit closer to what you are looking for.
<div>
<div style="float: left;">
<select name="_ctl26" id="Select1" class="control">
<option selected="selected" value="entity_name">Name</option>
<option value="DS_mnem">DS Mnemonic</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<select name="_ctl27" id="Select2" class="control">
<option value="Contains">Contains</option>
<option value="Equals">Equals</option>
<option value="StartsWith">Starts With</option>
<option value="DoesNotContain">Does Not Contain</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<input name="_ctl28" type="text" id="Text1" class="border" maxlength="75" onkeydown="return event.keyCode==13?OnExplorerSearchClick():true" /></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<span class="controlLabel">Currency Equals</span>
<span class='controlNameSeparator'></span>
<select name="_ctl30" id="Select3" style="z-index: 100;" class="controlLabel">
<option value="All">All</option>
<option value="Euro">Euro</option>
<option value="United States Dollar">United States Dollar</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<span class="controlLabel">IBES Equals</span>
<span class='controlNameSeparator'></span>
<select name="_ctl32" id="Select4" style="z-index: 100;" class="controlLabel">
<option value="All">All</option>
<option value="No">No</option>
<option value="Yes">Yes</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<span class="controlLabel">MSCI Equals</span>
<span class='controlNameSeparator'></span>
<select name="_ctl34" id="Select5" style="z-index: 100;" class="controlLabel">
<option value="All">All</option>
<option value="No">No</option>
<option value="Yes">Yes</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<span class="controlLabel">WS Equals</span>
<span class='controlNameSeparator'></span>
<select name="_ctl36" id="Select6" style="z-index: 100;" class="controlLabel">
<option value="All">All</option>
<option value="No">No</option>
<option value="Yes">Yes</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<span class="controlLabel">Exchange Equals</span>
<span class='controlNameSeparator'></span>
<select name="_ctl38" id="Select7" style="z-index: 100;" class="controlLabel">
<option value="All">All</option>
<option value="Frankfurt">Frankfurt</option>
<option value="London">London</option>
<option value="NASDAQ">NASDAQ</option>
<option value="New York">New York</option>
<option value="Non NASDAQ OTC">Non NASDAQ OTC</option>
<option value="NYSE Alternext">NYSE Alternext</option>
<option value="OTC Bulletin Board">OTC Bulletin Board</option>
</select></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<input name="_ctl39" type="button" onclick="OnExplorerSearchClick();" value="Filter"
onmouseout="MouseOut(this);" onmouseover="MouseOver(this);" class="search" /></div>
<div style="float: left;">
<span class='controlNameSeparator'></span>
</div>
<div style="float: left;">
<input name="_ctl40" type="button" onclick="resetFilter();" value="Reset" onmouseout="MouseOut(this);"
onmouseover="MouseOver(this);" class="search" /></div>
</div>
|
|
|
|
|
I can use a session variable in my vbscript but I get an error when I add the following line in the html to reference the code behind file.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
The error is:
The Session does not exists in the current context.
I want to use the code behind file, so how can I get this error to go away?
|
|
|
|
|
The class Default3 in the file Default3.aspx.cs should be inherited from System.Web.UI.Page class. If not, you will get this error.
|
|
|
|
|
That is code that the VS designer automatically wrote. Do you mean I have to change it?
|
|
|
|
|
I tought you had fixed your problem
Why dont you paste your code? Maybe some could help you
If it was working and then after adding that line its not
The problem could be with your class
Why dont you add a new page (select the option to use the code behind page)?
Alexei Rodriguez
|
|
|
|
|
Below is the html and code behind I'm working on.
The error I get is "The Session does not exists in the current context."
The error is referring to this session variable in the code: Session("DocumentFile")
If I remove this line the error goes away but I need my code behind file.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<title>Office Viewer Component Demo - EdrawSoft
#OA1
{
height: 750px;
width: 1000px;
}
Sub OpenFromServer()
On Error Resume Next
OA1.Open <% =Session("DocumentFile") %>
End Sub
Sub NotifyCtrlReadyEvent()
End Sub
NotifyCtrlReadyEvent()
OpenFromServer()
<asp:button id="Button1" runat="server" onclick="Button1_Click" text="Button">
|
<object classid="clsid:6BA21C22-53A5-463F-BBE8-5CF7FFA0132B" id="OA1"
="" codebase="http://www.ocxt.com/download/officeviewer.cab#5,6,578,1">
<param name="BorderColor" value="-2147483632" />
<param name="BackColor" value="-2147483643" />
<param name="ForeColor" value="-2147483640" />
<param name="TitlebarColor" value="-2147483635" />
<param name="TitlebarTextColor" value="-2147483634" />
<param name="BorderStyle" value="1" />
<param name="Titlebar" value="0" />
<param name="Toolbars" value="1" />
<param name="LicenseName" value="<Company Name>" />
<param name="LicenseKey" value="<Product License Key>" />
<param name="Menubar" value="1" />
<param name="ActivationPolicy" value="1" />
<param name="FrameHookPolicy" value="1" />
<param name="MenuAccelerators" value="1" />
| | |
Code behind:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Default3 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
|
|
|
|
|
I found the problem. If I change Session("DocumentFile") to Session["DocumentFile"] everything works great!
|
|
|
|
|
Thats right
You were using vb syntax to access the session Session("name")
And in your code is c#
Alexei Rodriguez
|
|
|
|
|
Hi,
In my application am using repater control of item template hyperlink button in one page. i want to navigate another page when i click the link butoon through code behind. plz give me reply.
|
|
|
|
|
If you want to navigate in code behind, use a link button, because a hyperlink, is going to navigate without any sort of postback.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
sqlstr = "select country , city FROM tbl_data WHERE RID in( " & ID & ") "
dr = ''''''''''''''''''''exexuting the reader
Ifdr.HasRows Then
Whiledr.Read
Dim datacountry =dr("country").ToString.Trim
Dim datacity =dr("city").ToString.Trim
MsgBox(datacountry & "===" & datacity)
sqlstr = "SELECT user FROM tbl_info " _
& " WHERE country='" & drpcountry.SelectedItem.Text & "' AND city='" & drp city.SelectedItem.Text & "'"
dr = ''''''''''''''''''''exexuting the reader
Ifdr.HasRows Then
Whiledr.Read
sqlstr = "IF EXISTS (SELECT user, country, city FROM tbl_info " _
& " WHERE user='" &dr("user").ToString.Trim & "'" _
& " AND country='" & datacountry & "' AND city='" & datacity & "')" _
& " UPDATE tbl_info set user='" &dr("user").ToString.Trim & "' " _
& " WHERE user='" &dr("user").ToString.Trim & "' AND country='" & datacountry & "' AND city='" & datacity & "' " _
& " Else " _
& " INSERT INTO tbl_info(user,country, city) " _
& " VALUES ('" &dr("user").ToString.Trim & "','" & datacountry & "','" & datacity & "')"
''''''''''exexuting the query........
End While
End If
End While
End If
but in this only the first record from the country and city gets affected.
all the records obtained in the reader shld get affected
how do i rectify it
|
|
|
|
|
Have you ever used a debugger ?
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
From you code, it seems that the SqlDataReader variable 'dr' is re-builds again within the first while loop.
Use another variable for inner data reader.
|
|
|
|
|
I was hoping to instead teach him how to debug his own code, one run through in the debugger should have told him what was wrong.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I have something of a time issue, and I need to deliver a very basic, early edition of a web site within the next two days or so. I would like to have at least:
Three horizontal 'bands':
1) a flagship photo and some text at the top
2) a horizontal photo-film (with sprocket holes etc.) underneath that, with frames containing one photo for each of several categories, where clicking one opens a set of photos in the category in the bottom band
3) a bottom band containing pages of photos for a chosen category.
I would appreciate some suggestions on the quickest and easiest way to achieve this using ASDP.NET 'dirty tricks' and technologies. I think a DataList for the film strip and bottom band will be quickest, but how can I achieve the 'sprocketed frame' look quickly?
You really gotta try harder to keep up with everyone that's not on the short bus with you.
- John Simmons / outlaw programmer.
|
|
|
|
|
The sprocket look is bound to be a bitmap with the filmstrip placed top and bottom with the photos in the middle. I would use a repeater, because of the level of control it gives you.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
I haven't used this tool yet, but I watched some demo videos and it looks really cool.
Xara Web Designer
http://www.xara.com/us/[^]
|
|
|
|
|
hi all,
m trying to create email newsletter ,
and m putting content of the newsletter in a table and i want the user to be able to click on the table content to go to some link, it works fine on chrome but not in IE , here is my code.
//Email body is html format
<%-- <a href='someurl'>
'<table>
'newsletter data
'</table>
'</a>
--%>
and i forget something ,we cant but any script "onclick();" here because it will be disable by email engine .
thanks for all.
|
|
|
|
|
I don’t think you can put a table inside a link, it is not a standard (W3C) so browsers will translate it differently. Instead put your link in your cell. Then perhaps use a style to make it not look like a link.
<table border="1">
<tr>
<td>
<a href="http://www.codeproject.com" style="text-decoration:none; color:Black; display:block;">
This is my news letter
</a>
</td>
</tr>
</table>
<br />
<table border="1"><br />
<tr><br />
<td><br />
<a href="http://www.codeproject.com" style="text-decoration:none; color:Black; display:block;"><br />
This is my news letter<br />
</a><br />
</td><br />
</tr><br />
</table><br />
PS.. If you are trying to trick the end user to go to your site, many of them now require you to hold down a button to follow the link.
John
|
|
|
|
|
Hi there,
First of all table control cant be nested in (a) tag (this will not make the content clickable), second of all you should be using tr and td tags within a table ...
To solve this you could use the following example:
<table>
<tr>
<td>
<a href="Home.aspx">Hit Me</a>
</td>
</tr>
</table>
Here you are nesting the (a) element inside the table element in which it will be clickable according to the behaviour you want.
Hope that helped !
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|
|
Hi,
I am a beginner in .NET.
I Placed a DropDownList in GridView's EditItemTemplate field.
Whenever i click the Edit Button i am getting a runtime error stating
"object Reference not set to an instance of the object".
That is,when i try to find the DropDownList using FindControl method,it is always null.
I have tried a lot of code in both GridView's RowBound and RowEditing events.
But,all the time i am getting the same error.
Below i have given the code that i tried in RowEditing event.
It will be very helpful if anyone help me in resolving this error.
.aspx source code
<asp:gridview id="gvDocumentDetails" runat="server" autogeneratecolumns="false" width="97%" autogenerateeditbutton="true"
="" ondatabinding="gvDocumentDetails_DataBinding" onrowediting="gvDocumentDetails_RowEditing" onrowupdating="gvDocumentDetails_RowUpdating" onrowdatabound="gvDocumentDetails_RowDataBound">
<columns>
<asp:boundfield headertext="Incident ID" datafield="Incident_ID">
<asp:boundfield headertext="Application" datafield="Application">
<asp:boundfield headertext="Type" datafield="Type">
<asp:boundfield headertext="Document Details" datafield="Document_Details">
<asp:boundfield headertext="Uploaded Date" datafield="Uploaded_Date">
<asp:templatefield headertext="Approval Status">
<itemtemplate>
<asp:label id="lblDocumentStatus" runat="server" text="<%#" eval("approval_status")="" %="">/>
<edititemtemplate>
<asp:dropdownlist id="ddlApprovalStatus" runat="server" datatextfield="Approval_Status" datavaluefield="Approval_Status_ID">
.cs file
protected void gvDocumentDetails_RowEditing(object sender, GridViewEditEventArgs e)
{
int intEditIndex;
intEditIndex = e.NewEditIndex;
gvDocumentDetails.EditIndex = e.NewEditIndex;
PopulateApprovalStatus(intEditIndex);
}
protected void PopulateApprovalStatus(int intRowIndex)
{
DataSet dsApprovalStatus = new DataSet();
DropDownList ddlApprovalStatus = null;
ObjReviewDocumentsBL.LoadApprovalStatus(out dsApprovalStatus);
ddlApprovalStatus = (DropDownList)gvDocumentDetails.Rows[intRowIndex].Cells[6].FindControl("ddlApprovalStatus");
ddlApprovalStatus.DataSource = dsApprovalStatus;
ddlApprovalStatus.DataBind();
}
I have checked the "dsApprovalStatus" dataset while debugging,and it has been filled by the LoadApprovalStatus() function.But, i m getting error in the following line.
ddlApprovalStatus.DataSource = dsApprovalStatus;
And ddlApprovalStatus value is null.
Thanks in advance...
Yazhini
|
|
|
|
|
Hi there,
I think you already knew half the solution to your problem ... the returned null object from FindControl is because he really cant find it in Cell[6]... well try going more deeper ... use the debugger to see all controls inside Cell[6] and then in each one try finding your dropdownlist ... I think all you have to do is go one step deeper as I recall for the EditTemplate.
Sincerely Samer Abu Rabie
Imagination is more important than knowledge !
|
|
|
|
|
Yes...i might have been given as Cell[5].But,that alone is not the mistake.
I have resolved the problem now...
I think the main mistake is that i haven't filled the Grid at the RowEditing event.
After doing that,i got it.
Anyhow,thanks for helping me...
Now,i have another doubt.
How to retrive the cell value of the BoundField in the RowUpdating event?.
For example,i have to retrive the IncidentNo whose ApprovalStatus has been edited and have to pass both the ApprovalStatus and IncidentNo values to another function.
Since The IncidentNo column is a BoundField control,how to get it's value in the RowUpdating event?
Yazhini
|
|
|
|
|
i am taking a button in aspx page,so we want that when we click on button so my hp scanner will start.plz give some understandable code.
thanks and regrds
vivek
|
|
|
|
|
Is your scanner on the server??
|
|
|
|