|
"screen size" is not OK: do you expect all your users to run their web browsers maximized? I don't - and I get annoyed by some stupidly designed web pages assuming that they can use 2560 pixels wide (or sometimes even 4480 pixels, since I have two monitors). The client size of the browser is the correct value!
|
|
|
|
|
I am not looking for any browser pixels i was looking for a page which does not show much of a whitespace.......please read the post properly....
|
|
|
|
|
If you adjust for browser or, screen size, you will still need to think about printer friendly version of your web pages.
|
|
|
|
|
hi everyone,
i'm having a problem like i have gridview control with
4 columns and column1 is a text column and col2 is flag column where as col3 and col4 are item templates where a textbox is embedded in each of the item templates, col1 text and col2 values
are comming from oracle ref cursor, based on the flag condition of col2 coming from ref cursor we need to display the item template with textboxes in col3 & col4 and how to validate those boxes in item template when submitting data to the database meanwhile we need to convert the data into an xml format to store the data to the database ,if anyone who understand my problem are invited to answer.
thanks in advance,
jeeva
|
|
|
|
|
I have some data from model , in which i getting some hex values .. now i need to translate this hex values to real color.
I have try this way...
@Html.DisplayFor(modelItem=>System.Drawing.ColorTranslator.FromHtml(item.color))
But this not working.
item.Color is a value from database and it's like this #ffffff;
Any suggestions ?
Thanks for help in advance!
|
|
|
|
|
try this
<span style="display: inline-block; width: 20px; height: 20px; background-color: @item.Color"></span>
it would display like this:
Help people,so poeple can help you.
modified 29-May-13 1:54am.
|
|
|
|
|
Ali you are the King!
Thank you!
|
|
|
|
|
The king of Persia
Help people,so poeple can help you.
|
|
|
|
|
In GridView
BackColor='<# System.Drawing.Color.FromName(Eval("item_color").ToString())%>'
|
|
|
|
|
Thnxs for info how to do that in WebGrid!
|
|
|
|
|
Alem.B wrote: But this not working.
Define "not working".
The only obvious problem with your code is the inconsistent naming in your lambda expression:
modelItem => System.Drawing.ColorTranslator.FromHtml(item.color)
This should either be item => ... or ...FromHtml(modelItem.color) .
Also, is it item.color or item.Color ? In C#, the case matters.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Thnxs for some sahring some intresting info!
|
|
|
|
|
Thnxs for some sharing some intresting info!
|
|
|
|
|
How to use i frame in asp.net with dynamic height
|
|
|
|
|
set runat="server" id="ifWidth" in iframe tags.
and then write the coding in server side in bellow format
ifWidth.Attribute.add("style","height:350;");
|
|
|
|
|
Hi everyone! I have a page in an e-shop where i would like someone to be able to view his orders. So i want to display data from an orders table in DB using a stored procedure and checking the userid session, so that the user who is logged in can see his orders. Here is my code:
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="order_id" DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="order_id" HeaderText="order_id"
InsertVisible="False" ReadOnly="True" SortExpression="order_id" />
<asp:BoundField DataField="order_date" HeaderText="order_date"
SortExpression="order_date" />
<asp:BoundField DataField="order_value" HeaderText="order_value"
SortExpression="order_value" />
<asp:BoundField DataField="order_status" HeaderText="order_status"
SortExpression="order_status" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:BoardGamesConnectionString %>"
SelectCommand="'OrderInfo'" SelectCommandType="StoredProcedure">
<SelectParameters>
<asp:Parameter Name="order_id" Type="Int32" />
<asp:Parameter Name="order_value" Type="String" />
<asp:Parameter Name="order_date" Type="String" />
<asp:Parameter Name="order_status" Type="String" />
<asp:SessionParameter Name="UserID" SessionField="UserID"
Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
Stored Procedure looks like this:
ALTER PROCEDURE [dbo].[Orderinfo]
@order_id int,
@order_value nvarchar(max),
@order_date nvarchar(max),
@order_status nvarchar(max),
@UserID int
AS
Select order_id, order_date, order_value, order_status from Orders Where UserID=@UserID And order_status='Εκκρεμεί'
What am i doing wrong? Thanks in advance!
|
|
|
|
|
Hi Diana,
I hope you are expecting to bind the orders for the particular user based on the Session["UserID"].
Then why you are passing the @order_id, @order_value, @order_date, @order_status to your Orderinfo (Stored Procedure). Okay let it be.
If you think it is necessary to pass those parameter (@order_id, @order_value, @order_date, @order_status) then you have to pass corresponding values for those parameter.
To pass the values for the corresponding parameters you have to create OnSelecting event for the SqlDataSource as below
Quote: <asp:gridview id="GridView1" runat="server" autogeneratecolumns="False"
="" datakeynames="order_id" datasourceid="SqlDataSource1">
<columns>
<asp:boundfield datafield="order_id" headertext="order_id"
="" insertvisible="False" readonly="True" sortexpression="order_id">
<asp:boundfield datafield="order_date" headertext="order_date"
="" sortexpression="order_date">
<asp:boundfield datafield="order_value" headertext="order_value"
="" sortexpression="order_value">
<asp:boundfield datafield="order_status" headertext="order_status"
="" sortexpression="order_status">
<asp:sqldatasource id="SqlDataSource1" runat="server"
="" connectionstring="<%$ ConnectionStrings:BoardGamesConnectionString %>" <b="">SelectCommand="OrderInfo" SelectCommandType="StoredProcedure" OnSelecting="SqlDataSource1_Selecting">
<SelectParameters>
<asp:parameter name="order_id" type="Int32">
<asp:parameter name="order_value" type="String">
<asp:parameter name="order_date" type="String">
<asp:parameter name="order_status" type="String">
<asp:sessionparameter name="UserID" sessionfield="UserID"
="" type="Int32">
</SelectParameters>
Then in the code behind add the below SqlDataSource1_Selecting event
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e)
{
e.Command.Parameters["@order_id"].Value = 0;
e.Command.Parameters["@order_value"].Value = "";
e.Command.Parameters["@order_date"].Value = "";
e.Command.Parameters["@order_status"].Value = "";
}
I hope this one will help you.
Please give your valuable feedback, It will help me in future. ( This my first post).
S. Prince Sagayaraj
|
|
|
|
|
I am trying to use the SmarterStats webservice. Here is the code I am using:
SiteAdminSoap website_stats = new add_website_stats.SiteAdminSoap();
add_website_stats.ConfigLogLocation[] logLocations = new add_website_stats.ConfigLogLocation[1];
add_website_stats.ConfigLogLocation logLocation = new add_website_stats.ConfigLogLocation();
logLocation.FilePath = @"C:\Inetpub\vhosts\website.com\statistics\logs\W3SVC37";
logLocation.FileWildcard = "*.log";
logLocations[0] = logLocation;
website_stats.AddSite3("xxxuser", "xxxpassword", "testUserName", "testPasswordHere", "myFirstName", "myLastName", 1, 333, "www.website.com/mychannel22", "W3Cex", logLocations, @"C:\Inetpub\vhosts\website.users\statistics\logs\SmarterLogDirectory", 0, @"C:\Inetpub\vhosts\website.users\statistics\logs\SmarterExportDirectory", "", -1);
I am getting Cannot create an instance of the abstract class or interface on this line:
SiteAdminSoap website_stats = new add_website_stats.SiteAdminSoap();
kindly help...
Technology News @ www.JassimRahma.com
|
|
|
|
|
That message seems quite clear: SiteAdminSoap is an abstract class or interface so it cannot be instantiated. You need to read the documentation for it.
Use the best guess
|
|
|
|
|
You have to create your own class deriving from add_website_stats.SiteAdminSoap, e.g.
public class MyStats : add_website_stats.SiteAdminSoap
{
public MyStats() : base()
{
}
}
which implements / overrides some functions and properties of the base class.
And then, of course, you have to create an instance of your class instead of that base class:
SiteAdminSoap website_stats = new MyStats();
|
|
|
|
|
I need to know how to attach multiple attachments with a mail dynamically. number of attachments will only been known dynamically only so please tell help me out in this issue
|
|
|
|
|
|
thank you Richard MacCutchan
|
|
|
|
|
Do you already have a function to send out the emails?
|
|
|
|
|
Yes i Have the functions for sending out the mail with just one mail
|
|
|
|