|
*grin* beats me. Like I said, I just came onto this project. I have fixed that, you get redirected to the login now.
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 a website with 9 ImageButton tags
<asp:imagebutton id="ImageButton1" cssclass="HomePageRowOne" runat="server" imageurl="~/Images/02-team_nav-on.jpg">;
etc....
my css file (which is working as when I change the width and height it alters at runtime) does not pick up the border attributes...if I apply them to the image tag in HTML all is fine but then I dont want them in my HTML.
CSS file:
.HomePageRowOne
{
border-style:solid;
border-right-style:solid;
border-right: white 10px solid;
border-left: white 10px solid;
border-bottom: white 10px solid;
border-top: white 10px solid;
height: 30%;
width: 30%;
float: left;
}
is there a different border command in CSS for ImageButton ?
Any help would be great...
Harvey
|
|
|
|
|
CSS has no idea what imagebutton is. You should perhaps look at the source that's being generated to see what's happening, perhaps ASP.NET adds some attributes to the controls it uses to create an imagebutton by default.
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 Christian,
I dont suppose CSS knows what any of them asp: xxxx="" mean but that doesn't stop it applying attributes to the tag, I have changed it to a asp:linkbutton and this puts the borders on fine but cannot set the imageurl in <asp:linkbutton>. Is there something about asp:imagebutton that doesn't work?
modified on Wednesday, March 26, 2008 6:22 PM
|
|
|
|
|
What I mean is, you need to look at what the tag is that's being generated, and try to work out from the source, what's going wrong.
you need to check 'Ignore HTML tags in this message (good for code snippets)' if you want to paste HTML into your reply.
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 )
|
|
|
|
|
Thanks, good idea.
It's not taking the attributes on (not a shock really)
if anyone has any idea?
Thanks
|
|
|
|
|
Hi all,
I'm trying to load a UserControl inside another UserControl using LoadControl in the "OnInit" event-handler of the page..
The problem is that if I clicked a button then pressed refresh for the page the event-handler of the button is automatically called again..
Any idea how to solve this??
Thanks a lot
PS. I'm using ASP.net 2.0
|
|
|
|
|
If you click a button and refresh then that always happens, regardless. The way around it is to do a redirect to the same page in the button click event and put any info you need to restore state on the URL.
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 )
|
|
|
|
|
Try using this
<br />
DropDownList1.SelectedItem = DropDownList1.Items.FindByValue("Your Value goes here");<br />
Paras Kaneriya The difference between genius and stupidity is that genius has its limits.
|
|
|
|
|
Hi,
I coded an aspx page with drop down lists, when the user selects a value from the drop down list, my javascript code gets the selected values of drop down lists and reload the page with the values in the url. After reloading I want to show the selected values in the drop down lists, I couldn't understand how to this. for the moment I can retrieve the selected values of drop down lists. Here is my code with selected values. Any one please tell me.
lang = Request.QueryString["lang"];
viewType = Request.QueryString["view"]; // viewType may be List or Pic
sortBy = Request.QueryString["sortBy"];
if (viewType != null || viewType != "") //ddlView contains "List View" and "Pic View"
{
ddlView.SelectedItem.Text = viewType + " View"; // Here its changing the default value and I am having both values same in the drop down after execution of this statement.
}
Thanks,
Best Regards,
Aruna.G
|
|
|
|
|
gottimukkala wrote: ddlView.SelectedItem.Text
Try setting the text or selectedtext of the control. You're changing the text of the currently selected item, not actually changing which item is selected.
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 have used the CreateUserWizard to create users. Does anyone know how i can let users edit their details such as email....
many thanks
|
|
|
|
|
An ASP.NET web site is supposed to be deployable simply by dropping the aspx and config files on the server, which will invoke the compiler if a page has not yet been compiled etc. Is is possible to define the target Framework, i.e. 2.0 instead of 3.5, without using Visual Studio?
|
|
|
|
|
Brady Kelly wrote: Is is possible to define the target Framework, i.e. 2.0 instead of 3.5, without using Visual Studio?
Definitely possible. All the files that you need to compile an application are text files. You can write everything in Notepad and use the command line compiler if you like.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thank you, but maybe I should have phrased my question better. I already suspected this, but I wanted to know where to set the target framework in these text files.
|
|
|
|
|
|
Yes, but ASP.NET files are not compiled in VS, they are compiled on the fly, so should there not be a way of telling the compiler used by the ASP.NET pipeline which framework to target?
|
|
|
|
|
Brady Kelly wrote: so should there not be a way of telling the compiler used by the ASP.NET pipeline which framework to target?
I wouldn't think so in the case of IIS since the framework version is an IIS setting you can't expect to set it to something different for compilation. At least it doesn't seem that would work very well.
led mike
|
|
|
|
|
Brady Kelly wrote: but ASP.NET files are not compiled in VS
They can be, as in precompiling.
In the IIS settings you can switch the version of the .NET framework is used for a particular site, provided there are multiple install on the machine of course. I don't know if this effects to on-the-fly compilation though.
only two letters away from being an asset
|
|
|
|
|
I spent the long weekend getting much, much better acquainted with Satan, i.e. data binding and the SqlDataSource. I found some wonderful jewels, like SessionParameter, but also found myself having to use SQL Profiler to, first see if my stored proc was even being called, and second, when it was being called, why it was failing. SqlDataSource raises no exceptions and exposes no error events whatsoever!
Then, my consternation, the ControlParameter. Worked wonderfully for the first page I built, using a hidden field on the form to store a select parameter for a stored procedure. With no change, the ControlParameter refused to work as an insert parameter on any further forms I built, while falling back the ever trusty Parameter and Bind() worked fine, and even the suspect SessionParameter and the even wilder QueryStringParameter all worked fine.
|
|
|
|
|
Brady Kelly wrote: SqlDataSource raises no exceptions and exposes no error events whatsoever!
Another reason I'd never use it What benefit is it offering you ?
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 )
|
|
|
|
|
No code! Seriously, I found it quite nice for prototyping, when I had only so much time for layout and code, and only focussing on one view, the ascx view, made it quite feasible. The other reasons are that I'm trying to get to know all of ASP.NET better, and that includes these nasties. Rest assured my efforts also include understanding the request pipeline, IIS integration, and even the new MVC stuff.
|
|
|
|
|
Hi All,
I have a custom server control that derives from System.Web.UI.WebControls.TextBox. What id like to do is override the CreateChildControls method and add a hiddenfield control so I can persist some data from client side and have access to it from server side.
The problem is that this control isn't created. I have tried putting EnsureChildControls in both OnLoad and OnInit but it doesn't seem to work either way.
Any help is appreciated.
MoE
|
|
|
|
|
Your approach strikes me as one that should work. When you create the HiddenField , do you also add it to your Controls collection? Have you walked through in the debugger to verify that CreateChildControls is being invoked?
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi Jesse,
I am adding the control to the Controls collection and have verified that the CreateChildControls() is being called and going to my piece of code.
I've created composite controls before where I've used the same method. Do you think its because I'm inheriting from Textbox that I am having problems?
Thanks!
MoE
|
|
|
|