Web Forms :: How To Combine Static Value At Runtime

Sep 16, 2010

i am using oracle 10g... m showing some data for a particular record on my page.. i have some fields where i have to mention thr units like 'metre' or 'kg' as in my database those fields are numeric so can't make change directly in database.. so is thr any other solution so that i can display those fields with thr proper units at runtime like 'depth= 100 m'..

View 6 Replies


Similar Messages:

C# - Public Static HashTable / Stores Data For A Few Seconds Of Runtime, And Then Data Disappears?

Feb 22, 2011

I have defined a public static HashTable. It stores data for a few seconds of runtime, and then data disappears, and then the HashTable becomes null.What is the issue and how do I solve it?

View 1 Replies

Data Controls :: How To Modify Static Variable At Runtime To Pass Data From One Form To Another

Apr 16, 2014

I have using Static Variable  in My project.i want Change Static variable value because of transfer the value b/w two  Forums... and I want Change value at run time...provide solution

Or else Any other way transfer value b/w two forms......

View 1 Replies

C# - Is It Safe To Access .net Session Variables Through Static Properties Of A Static Object

May 10, 2010

Is it safe to access asp.net session variables through static properties of a static object?Here is what I mean:

public static class SessionHelper
{
public static int Age
{
get
{
[code]...

Is it possible that userA could access userB's session data this way?

View 2 Replies

Web Forms :: Activex Script For Detectig .NET Runtime And Directx Runtime?

May 20, 2010

Can anybody let me know the activex script for detecting .net runtime and directx runtime or any other way how can I detect this in any machine by from my web page ?

View 1 Replies

C# - How To Lock A Private Static Field Of A Class In One Static Method

Mar 26, 2011

I have a private static field in my Controller class in an MVC web application.

I have a static method in that controller that assigns some value to that static field, I want to apply lock on that static field until some other instance method in the controller uses the value stored in the static field and then releases it.

DETAILS:

I have a controller named BaseController having a static ClientId field as follows and two methods as follows:-

public static string ClientId = "";
static void OnClientConnected(string clientId, ref Dictionary<string, object> list)
{
list.Add("a", "b");
// I want the ClientId to be locked here, so that it can not be accessed by other requests coming to the server and wait for ClientId to be released:-
BaseController.clientId = clientId;
}
public ActionResult Handler()
{
if (something)
{
// use the static ClientId here
}
// Release the ClientId here, so it can now be used by other web requests coming to the server.
return View();
}

View 1 Replies

AJAX :: Calling Non-static Methods From A Static Method?

Jun 30, 2010

I did some research after posting. All I found was simple examples for no-layer architectures, like connecting to a database from your aspx page, so, in a corporate environment, it is unnaceptable.

I need to call a server-side method (using ASP.NET Ajax) in a 3-layer architecture.

For example, my Default.aspx contains a method LoadProducts().

[Code]....

[Code]....

This cannot change. There is no way to convert Business and Data layers to static.

How can I call the LoadProducts() method using ASP.NET Ajax?

View 2 Replies

Public Static Variable Declared In Public Static Class MyGlobals In A 'Code File' Template?

Jan 27, 2011

I have a question about C Sharp ASP.NET:Is there a difference (in code speed, resources) between:public static variable declared in public static class MyGlobals in a 'Code File' template;and the variable declared in a normal 'Class File' template;I use this variable in 2 different Class Files and also in _Default Page codebehind cs file.In fact in my case I need about 20 global variables of type List<string>.

View 9 Replies

Web Forms :: How To Combine C# And Html/javaScript

Apr 17, 2010

i got a question that realy bothering me .... for the last 24 hours ...

how to combine c# and html/javaScript .....??

so ... the question :

for example i create a varible in my asp.net form .......

int variable = 2;
// some function .....
protect int makeItdouble(int variable)

{

return variable*2;

}
variable = makeItdouble(5); // some code i

and now i want to take this "variable" into my my javascript code .... this important thing is that i want thet this function will run first .... (the C# function)cus i take first my DataBase from the server and that prosses him more with some javascript code ...

View 10 Replies

Working With Static Variables / Store The User Specific Information In Static Variables?

Mar 5, 2011

whats the exact use of static variables in overall programming in .net and for asp.net...

Recently i went for the interview where interviewer asked me 2 question which i was not sure for the same..

whats the use of session object, i said sessions are the server side object, they are used when you want to store user specific data at server side, then he asked what if i want to use static variables for the same, i was mum, can anyone tell me how asp.net will behave if i store the user specific information in static variables.If i use cookies which are the best option to store the data at client side (not sensitive one), but what if user has disabled cookies on his machine, will my application would crash.

View 3 Replies

Web Forms :: Using Combine To Rename A File Upload?

Mar 19, 2010

I'm having a little trouble with an upload of a file. I wanted to add today's date in the name of the file so that when a user uploads a file such as "image1.jpg" it would be saved into the server as "image120100319.jpg" and stored in the database as in a field as /myfolder/subfolder/image120100319.jpgthis script works when I comment the new additions which are

[Code]....

string SQL = "INSERT INTO my table (dailyFile) VALUES(@IMGDAILYFILE)";
cmd.Parameters.Add(new SqlParameter("@IMGDAILYFILE", SqlDbType.NVarChar, 80));
cmd.Parameters["@IMGDAILYFILE"].Value = "/myfolder/subfolder/" + destPath3.Substring(destPath3.LastIndexOf("\") + 1);

View 2 Replies

Error: This Assembly Is Built By A Runtime Newer Than The Currently Loaded Runtime

Feb 28, 2011

I have downloaded published (code behind files are no there, combined with dll in bin folder) web application from window server 2008 where it is hosted, & open it with visual studio when i debug that application it shows following error: "Colud not load assembly because this assembly is built by a runtime newer than the currently loaded runtime" I don't know how can i solve this problem and test application locally.

View 2 Replies

Forms Data Controls :: How To Combine Some List Items Together

Jan 8, 2011

just want to have a quick question about the value of dropdownlist listitem. I have a gridview which has its datakey value linked to a dropdownlist. In the dropdownlist I have many listitems. So I decided to combine some list items together. Originally, the values of the items are 1,2,3,4,5,6,7,8. But I want to have only 5 items by combining 5,6,7,8 into one listitem called "Others." So if the listitem "Others" is selected, the gridview will show all the records that have value 5 or 6 or 7 or 8. Is it possible? How can that be done?

I hope I made myself clear. Any question, I am happy to clarify.

View 4 Replies

Forms Data Controls :: How To Combine Two Columns In The GridView

Oct 6, 2010

If I have two two columns: Date1 and date2,I would like to display in GridView1 than one column.

Example:
Date1 = 10/06/2010
Date2 = 07.10.2010

GridView1 (date1 + date2) = 06.10.2010 - 07.10.2010

View 2 Replies

Web Forms :: Combine Three Dropdown Value In Single Textbox Or Variable

Apr 15, 2012

i have three drop down - hours,minute and second how can combined value in single text-box or variable in hh:mm:ss format

View 1 Replies

Forms Data Controls :: Combine Two Table From Database Into One Gridview?

Feb 18, 2010

i would like to know some of these:

how to combine two table from database into one gridview?

is it possible to add in a textbox into gridview?

why my checkbox is not showing in the gridview. this is the UI and the code. the UI display the data i retrieved from the database but why is the image and the checkbox not showing?

[Code]....

View 12 Replies

Forms Data Controls :: Combine Gridview Columns Under One Column And In Separate Rows

Nov 29, 2010

I have a couple of things that are not working with my Gridview:

1) I've managed to display 3 columns in one column (see code above) but the data is separated by commas, how can I display each data item in separate rows.

2) How can I make the data unique, as I have added the distinct command which I configured in my SQL data source

3) I need the rows to not display nulls, but at the moment it isn't displaying the row if one of the columns is null?

[Code]....

View 3 Replies

Forms Data Controls :: Combine Two Boundfields Into One Calculated Column To Display In Gridview?

Nov 10, 2010

i am trying to combine two boundfields into one calculated column to display in Gridview like:

[code]....

View 8 Replies

SQL Reporting :: Can Combine LIKE And IN

Nov 4, 2010

I have a report with several filter parameters. Everything works fine presently. For one parameter, I use the LIKE as follows in my WHERE statement:

WHERE drug LIKE '%' + @drugused + '%'

@drugused is the selection value of a dropdown list. But now I want to change my parameter to allow multi-selection. But I am not sure how to write my WHERE statement for this. Normally I would use IN but I'm not sure how to do this with the LIKE.

View 6 Replies

C# - Can Combine Two Objects Into One

Oct 3, 2010

I'm preparing to pass values to a method:

private string BuildMessage(int templateID, string body, object data)


where the data param is an array of name/value pairs. To prepare my values for that data param I need to combine the properties of a strongly typed class with the values of a simple 2d array.

What's the best way to merge those values?

View 1 Replies

Utility To Combine Querystrings?

Apr 28, 2010

Is there a utility to combine querystrings? I'm looking for something like:

Input: Combine("test=a&test2=b", "test3=c") Result: "test=a&test2=b&test3=c"
Input: Combine("test=a&test2=b", "") Result: "test=a&test2=b"
Input: Combine("", "test3=c") Result: "test3=c"

And maybe some weird ones:

Input: Combine("&test=a&test2=b", "?test3=c") Result: "test=a&test2=b&test3=c"

View 5 Replies

Combine Silverlight) With SAP Webdynpro?

Mar 1, 2010

Does anybody knows possibilities or approaches to combine ASP.NET with SAP Webdynpro (or to embed/integrate Webdynpro in a ASP.NET (or Silverlight) application) ?

View 2 Replies

C# - Combine MP3 Files In Response?

Jan 19, 2010

I lied! The commandline fails if the two source files have different bitrates (does samplerate matter?). Also, the source code below succeeds when the two sources are the same bitrate. So, this looks like a bitrate challenge now.

Original question:

result.mp3 (from the commandline, below) is playable in WMP11. The ASP.NET code below serves a file which plays fine in WMP11. But, when I uncomment those two lines, WMP11 won't play the file. Something about the code that merges the two MP3 files isn't to the satisfaction of WMP11. How can I change the ASP.NET code to merge the two MP3s in the HTTP response with the success that the 'copy' commandline gives me?

protected void Page_Load(object sender, EventArgs e) {
Response.Clear();
Response.ContentType = "audio/mpeg";
Response.AddHeader("Content-Disposition", "attachment; filename=test.mp3");
var bytes1 = System.IO.File.ReadAllBytes(@"C: est1.mp3");
WriteBytesToResponse(bytes1);
//var bytes2 = System.IO.File.ReadAllBytes(@"C: est2.mp3");
//WriteBytesToResponse(bytes2);
Response.End();
}
private void WriteBytesToResponse(byte[] sourceBytes) {
using (var sourceStream = new MemoryStream(sourceBytes, false)) {
sourceStream.WriteTo(Response.OutputStream);
}
}

copy /B test1.mp3+test2.mp3 result.mp3

View 3 Replies

Can Combine WebResource.axd CSS Requests

Sep 15, 2010

I have developed some ASP.NET server controls which include their own javascript and css files. A lot of these controls use jQuery extensions which, as you know, often include their own css files.

I'm using Telerik's RadScript manager which combines the javascript like a boss. However, I'm using the AjaxToolkit's ClientCssResource attribute to include the css files in my server controls, and I have noticed that the CSS files are not getting combined at all. My pages have 10-15 WebResource.axd requests for css files for my server controls.

Everything I find only is about combining javascript, and nothing tells me how I can combine the CSS files. Does anyone know if there is a way to combine the CSS dynamically (I don't want to manually combine as each page might use a different subset of the server controls)?

View 2 Replies

SQL Server :: Combine Two Querys Into One?

Feb 9, 2011

My query below

SELECT
WORKORDER
WORKORDER
[dbo]
WORKORDER.ACCT, MASTERFI.NAME1,
.TICKET_RECV_DT, WORKORDER.WORK_ORDER_NUM,
.LAST_ACTION,WORKORDER_DETAIL.WORKER
FROM [dbo].WORKORDER,
.MASTERFI, [dbo].WORKORDER_DETAIL.......

I want to combine two querys into one, how do i achieve this result?

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved