|
What does 'not working' mean ? What do you get ? I'd expect this to work.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
The error which i'm getting is:
Compiler Error Message: CS0103: The name 'HardCodedValues' does not exist in the current context
Source Error:<br />
<br />
<br />
<br />
Line 24: <div align="center"><br />
Line 25: <a href="http://www.2kmobilelink.com" target="_blank"><br />
Line 26: <img border="0" id="ImgHeader" alt="<%= HardCodedValues.HeaderText %>" src='<%= ConfigurationManager.AppSettings["ImagePath"]%>2KMobileLinkHeader.jpg'<br />
Line 27: style="height: 185; width: 760" /></a><br />
Line 28: <br />
<br />
Regards n Thks
Sam.M
|
|
|
|
|
Ah - if you don't put your codebehind class in a namespace, I think the compiler invents one for you. Put the codebehind ( and thus the aspx reference to the class used ) in the same namespace as HardCodedValues
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Sorry, i don't understand. Can u please give me some sample code
Regards n Thks
Sam.M
|
|
|
|
|
In your ASPX
replace
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Request.Master" CodeBehind="CaseNotes.aspx.cs" Inherits="CaseNotes" %>
with
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Request.Master" CodeBehind="CaseNotes.aspx.cs" Inherits="MyNamespace.CaseNotes" %>
and in your code behind replace
public partial class CaseNotes : Page
with
namespace MyNamespace
{
public partial class CaseNotes : Page
Now, make sure that MyNamespace is the same as the namespace for your HardCodedValues class.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I have one dropdownlist box,i have to populate this dropdown with standard font names as its list items.I am new to this asp.net.
can anybody help me to do this its urgent.
Regards
Vidhya
|
|
|
|
|
vidhyap wrote: can anybody help me to do this its urgent.
Oh, but of COURSE it is.
Where do you want the font names to come from ? You can't access te font names on the client machine. Do you want to use a standard list ( may as well hard code it ), or get a list from the server, of the fonts there ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi Graus,
thanks for your reply,i just want to use standars font names.I tried using Fontcollection and fontfamily class.now i am able to populate the dropdownlist with fontnames.
I did the following coding:
<br />
System.Drawing.Text.InstalledFontCollection fontcollection = new InstalledFontCollection();<br />
<br />
<br />
foreach (FontFamily fonts in fontcollection.Families)<br />
{<br />
ddlFontName.Items.Add(fonts.Name);<br />
}<br />
hey can u just guide me is it ok.actualy its working fine.
Regards
Vidhya
|
|
|
|
|
It looks like it should work fine. Just remember, if your server has any odd fonts on it, they will also appear
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
ya.how to avoid those odd fonts?
is their any other way to do the same so that only standard font names should appear in the dropdownlist?
Now I have to populate 2 different dropdownlist's with standard font size and colour.can you guide me to do the same?
Regards
Vidhya
|
|
|
|
|
vidhyap wrote: how to avoid those odd fonts?
By building a standard list that you store in your web app and using that instead.
vidhyap wrote: Now I have to populate 2 different dropdownlist's with standard font size and colour.can you guide me to do the same?
There's no such thing as 'standard color', you can list any colors you like. The standard sizes are 8,10,12,14, etc. I think it differs by font. if you want to get that complex. What are you trying to do ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I m just creating one page which is used by admin who will select the font name,size and colour for all the other remaining pages which is used by the users or clients.
Regards
Vidhya
|
|
|
|
|
Hi,
I am using Payment Gatway where I am passing value to that gatway.
But I want to pass multiple value to payment gatway.
I have arraylist where I am sending details to that gatway.
But the query string accepts one values at a time.
Through Hidden field it is possible but I am not getting it.
The code is here
arr is the arraylist which contains price and product name.
for (int i = 0; i < arr.Count; i++)
{
pname = arr[i].ToString();
i = i + 1;
price = arr[i].ToString();
Response.Redirect("http://ww11.aitsafe.com/cf/add.cfm?userid=D4162580&product= " + pname + "&price=" + price + "&shipping="+lbl_shipcost);
}
Code using Hidden Field is
Where should I use this code
Thanks
|
|
|
|
|
I don't see how a hidden field would help. I have to wonder what you're thinking with this code. You create a loop, but you build the whole URL and redirect on the first iteration. Build the URL in the loop, so that it has all the query string values you need, THEN redirect.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
That's why I am saying that getting only first value and pass to query string is not useful. I want to send all the products and their price to gatway.
By passing one value to query string is working. Because it takes one value at a time.
But I want to send multiple values.
Thanks
|
|
|
|
|
You're either saying that you don't understand why redirecting with one value only doesn't work ( in which case, you need to buy a book if you can't see why having a redirect in a loop only passes one value ), or you're complaining that the gateway you're using doesn't support what you want ( in which case, there's nothign we can do about it ).
I would expect if you build a URL with multiple values on it, it would work. If it doesn't, then the gateway does not support it, so what can we do about that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello friends,
I build a dll in my application using class library project.
And in web application i add reference it is also showing in the bin folder and application directory.
but on the page.aspx.cs file when i try to import this with "using " keyword i am not able to do this.
I am not finding the classes in the application.
Plzz help me wht to now...
Thanks in advance..........
Deepak Nigam
|
|
|
|
|
Did you add a reference to the dll in the project?
|
|
|
|
|
Does the dll belongs to same solluation file?
please check the reference that you have added.
Best Regards
-----------------
Abhijit Jana
"Success is Journey it's not a destination"
|
|
|
|
|
Is there a way to get SharePoint to not preserve the state of a variable?
I want to be able to refresh the screen and have the previous value destroyed so the process knows to start with a fresh application state.
This is a SharePoint Web Part included with other web parts on an asp webpage. The SharePoint server renders the page so I don't have access to the page load events.
|
|
|
|
|
Hi,
In a web application, when user clicks log out button, I run Session.RemoveAll() and redirect his to home page. but after log out if it click back button of browser, he come back to previous page, that in load of it I checked the session, but the Load event don't fire (by clucking back button of browser).
what should I do?
Best wishes
|
|
|
|
|
Actully that page is coming from the cache.
try to remove the cache using this code
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.Now);
you can write this code on the master page load event........
Deepak Nigam
|
|
|
|
|
how do we open new aspx page or html file in new window from within a function in the .cs file.
(note: i have the html code that i want it in the page in a string variable)
more explaination:
i have a function that render the forms in my page into an html code, this is to open in it in a new page to be printable version. my current code now open the new page in the same page, and this is the code:
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write(strHTML);
HttpContext.Current.Response.End();
where strHtml is the variable that contains the html code of the new page.
thanks in advance
|
|
|
|
|
You cant directly from the code behind as the server doesnt have access to the clients pc, but if you use Page.RegisterStartupScript(.NET 1.1) or ClientScript.RegisterStartupScript(for .net3.5) or RegisterClientScriptBlock you can use javascript to open the new page, with the html contents. you'll have to enclose the js function in a block for it to work right. The difference between the functions is when they get executed. i cant remember the perticulars right now, i havnt used them in a while..i typically use StartupScript. A quick MSDN search should explain the differences rather easily. and if you want this to happen each time a button or some other control fires an event just use <your control="">.attributs.add(event, js code); Hope i helped. </your>
|
|
|
|
|
Hi,
I have a reportviewer control with a local report which consists of a list control (in the list is a textbox for the group header and a table with details). My question is that although the InitialToggleState = Collapsed by default on the textbox which is also the details group of the list control, the group is always expanded at runtime. Are more settings required to be able to get the "+" next to the group header and details be collapsed? Please assist.
|
|
|
|