|
But I know a website that is written in CGI and immediately after you enter the main page, it detects that you javascript is disabled and redirects you to some html page that tells you to enabled the javascript!
I don't care about the difference between detecting that the javascript is disabled or it is enabled! I just want to make the user, enable the javascript, when he enters my page!
For example, I use Firefox 2.0, and I have installed an add-on name "No Script" that blocks the javascript scripts until you allow them to run, but when I'm debugging my code, using Firefox, my code could not detect that the javascript scripts are blocked! Although the tags work correctly when this add-on block the scripts, but the Request.Browser.Javascript is true!
Sojaner!
|
|
|
|
|
Hi,
I want to use the autocomplete feature from Yahoo UI Library with a webservice call to the database in my ASP.Net application. (I dont want to use ATLAS-AJAX) I want to achieve something like this (as given below) but instead of using a static array i want to connect to the db using webservice in my ASP.NET application
<!-- Dependencies -->
<script type="text/javascript" src="yahoo.js"></script>
<script type="text/javascript" src="dom.js"></script>
<script type="text/javascript" src="event.js"></script>
<!-- Source file -->
<script type="text/javascript" src="autocomplete.js"></script>
<input id="myInput" type="text">
<div id="myContainer"></div>
<script type="text/javascript">
// A JavaScript Array DataSource
var statesArray = [
"Alabama",
"Alaska",
"Arizona",
"Arkansas",
"California",
"Colorado",
"Connecticut",
"Delaware",
"Florida" // Entire array not shown
];
var myDataSource1 = new YAHOO.widget.DS_JSArray(statesArray);
var oAutoComp = new YAHOO.widget.AutoComplete("myInput","myContainer", myDataSource1);
</script>
I have this code below which uses the Atlas-ajax feature to perform the autocomplete. But want to add the missing code using YUI syntax using webservice (BLOCK 2)
BLOCK 1
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<atlas:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server">
<atlas:AutoCompleteProperties Enabled="true"
MinimumPrefixLength="1"
TargetControlID="TextBox1"
ServicePath="~/Services/ProductService.asmx"
ServiceMethod="FindProducts" />
</atlas:AutoCompleteExtender>
BLOCK 2
<div id="statesmod">
<form onsubmit="return YAHOO.example.ACJSArray.validateForm();">
<h3>Find a product:</h3>
<div id="statesautocomplete">
<input id="statesinput">
<div id="statescontainer"></div>
</div>
</form>
</div>
oACDS = new YAHOO.widget.????????
?????
Does anybody have any links/pointers to the Yahoo UI objects and usage of webservices. So ideally BLOCK 1 and BLOCK 2 should return values from the db using ProductService.asmx
Thanks in advance.
PJ
|
|
|
|
|
Hello everyone
I have a weird problem with the cookies issue in a website developed with asp .net 2.0. This is the situation: First this website was developed on a PC (Development PC) with Windows XP Professional SP2 in VS .NET 2005 - ASP.NET 2.0. In this PC the website runs PERFECTLY!! Then I installed this same website in a Quality server that has Windows server 2003 to test the website before deploying it to the Production server. Obviously, this QA server has the .net framework 2.0 installed and the QA database for this website is already installed with persistent data. When I ran the website in this QA server, the login page appeared perfectly, and when I clicked on login, mysteriously, the browser (Internet explorer 6.0) redirects AGAIN to the login page leaving in blank the textfields where I typed down the user and the password. This thing doesn't happen in the development PC!! In there, when you click on login, the user is authenticated and the browser goes to the main menu page. That is the normal flow. I already discarded the possibility that the user wasn't authenticating. I already checked this in the QA server. I'm sure this is a cookie problem. By default, the authentication part in the web.config is like this:
<authentication mode="Forms">
<forms loginurl="Login.aspx" protection="All" timeout="30" name="SIGOSecCookie" path="/SIGOWeb" requiressl="false" slidingexpiration="true" defaulturl="Default.aspx" cookieless="UseCookies" enablecrossappredirects="true">
Then I made a change in the cookieless attribute setting it to "UseUri" and when I did that, the website in the QA server WORKED PERFECTLY!! I mean, the browser redirected to the main menu page instead of going back to the login page!! But I can't leave that cookieless mode to UseUri!, I have to leave it in UseCookies because in the development PC the website works with UseCookies and the company wants it like that. In summary, the website in QA works perfectly if I set the cookieless to UseUri but works bad (it redirects to the Login page) If I set it to UseCookies.
Note: It is important to mention that the IIS configuration for the website is just the same in each PC. The login page has the login component of ASP .NET 2.0 and uses the Membership and Provider thing to authenticate the user (As I told you the athentication part works fine, don't worry about that), The DestinationUrl for this login component is Default.aspx (this page is the one with the main menu)
How can I solve this issue leaving the cookieless in "UseCookies"? I would be very grateful if you help me with this problem, I've been for 2 weeks trying to figure it out but I haven't solved it. I hope your answer and thank you.
Sincerely,
Agustin Conde
|
|
|
|
|
Im working on an intranet, it requires the domain username to build the correct SQL Instructions, i've got it whit the following:
currentUser = Request.ServerVariables["LOGON_USER"].ToString();
but i also require to use the integrated security option on the Connection String (to manage user privileges, i dont want lo let them enter with sa), and when i run my application appears:
" Login failed for user 'DOMAIN\MACHINE$'. "
Can somebody help me?
thank's
|
|
|
|
|
i want to sort grid view control by just click on header of the column...
does any one know abt its implementation..?
i know that i need to write event handler for that...
but i dont know how to write it?
plz help me
my code is in C#
thank u in advance.
|
|
|
|
|
|
Hi, is it possible if i can reference the asp:link button id in javascript so within the javascript function i can do something like make link button enabled
i tried doing something like that in javascript didn't work. Can somebody help me in it.
<asp:linkbutton id="mylinkBtn" onclientclick="return Showme();" runat="server">
function Showme()
{
document.getElementById("mylinkBtn").Enabled=true;
}
|
|
|
|
|
try something like this :
<br />
document.getElementById("<%=mylinkBtn.ClientID %>").disabled="disabled"; <br />
|
|
|
|
|
Hi, Thanks but
i tried doing like
document.getElementById("<%=mylinkBtn.ClientID %>").enabled="enabled";
this didn't work. I mean my mylinkBtn control didn't get enabled.
is there any tutorial or something where i can check what are the properties like enabled, disabled,visble...etc
|
|
|
|
|
<br />
document.getElementById("<%=mylinkBtn.ClientID %>").disabled=true;<br />
Check this article[^]
|
|
|
|
|
As the LinkButton control would be rendered as a tag at run-time and this tag does not have any attribute to enable or disable it, it would not be possible but if you use a HTML Button element or even a asp:button, both would be rendered as a tag and it would support the disabled attribute and so you can write your code like this:
<br />
<script language="javascript"><br />
function Showme()<br />
{<br />
var button = document.getElementById("myButton");<br />
button.disabled = false;
}<br />
</script><br />
Sojaner!
|
|
|
|
|
hi,
why should we use Autopostback=true, when we want to use listindex change event??
i saw few examples, they are saying that we have to use autopost back but why should we use it is no one explained.
thanks,
Rahi
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
|
thanks.
If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
|
|
|
|
|
hi all,
my problem is in previous ASP.NET (VS 2003) writing a
function that grabs a string value from a textbox is as easy as:
dim str as string = me.TextBox1.Text
but with visual studio 2005 I can't do this simple way because the class for
that form is placed in the app_code folder and it will not see non of the
web controls on the web form, so saying:
dim str as string = me.TextBox1.Text will not work and it complains about
the TextBox1 is not defined. in more details, I have a function was working
in visual studio 2003 that calls a stored procedure in sql server 2005, this
function passes a variables (3 variables) from a 3 textboxes on the form.
And I am calling this function everytime the user changes the value of one
of these textboxes.
now since the migration, visual studio 2005 puts all classes under App_Code
folder (as one of their new features!!) moving my function under the
App_Code folder prevents me from calling/Getting the values of those
textboxes as they change why? because the class can't see those controls
sitting on the form!
I am going crazy with this. Does anyone know?
thanks for your help.
|
|
|
|
|
Just use the code behind page. When you add a web form make sure you check the 'Place code in separate file' checkbox then there should be a little plus sign next to the .aspx page, when you expand it you'll see a .aspx.cs (or .aspx.vb depending on language) file where you can do all you work with the controls. app_code is for more universal code like business logic (though I normally make another project in the solution for this), server controls, or help classes.
|
|
|
|
|
thanks eggsovereasy for your reply,
this is a very good news, because i was chatting with some guys and they told me that i HAVE to follow the new format (App_Code) and the old VS 2003 is being discontinued and it would increase performance or something like that. anything true to that?
plus, do u have any idea if a project has already been migrated and(all classes being moved to the App_Code folder), if there is a way to move all those classes back behinde their forms? or i have very much to re-migrate?
-- I just did a re-migration and there is no option or checkbox to force visual studio to use code behinde page! any idea?
thanks a lot
-- modified at 12:04 Thursday 18th January, 2007
|
|
|
|
|
Hi,
I want to fill default white backround color inside the asp.net checkbox to some different color (e.g. gray) but none of the properties exposed by asp.net checkbox control seems me to do that. does anybody have any idea about how to achieve this.
Regards,
Amit
|
|
|
|
|
This makes it gray for me:
<asp:CheckBox id="cb1" runat="server"
BackColor="#CCCCCC"
Text="My Checkbox"
/>
|
|
|
|
|
Mike,
I was asking to fill the checkbox with gray color and not the outside area of the checkbox.
Regards,
Amit
|
|
|
|
|
Oh. I see. I don't think you can do that, even with CSS. The solutions I have seen have resorted to using javascript to swap images between a "checked" state and "unchecked" state, using a colored box as for the images.
|
|
|
|
|
Hi all,
I have been working on a "web interface" project but I am unable to get it working. Here is what I want to implement. I have been trying to bind the 5 Listbox controls to a single Repeator Control. I have populated the 5 Listbox controls from the underlying database tables. Whenever the user selects values from each listbox controls the result should be displayed in the Repeater control. I can bind one listbox to the Repeater but I can't bind all five listboxes at the same time.
Looking forward to your reply
Thanks for your help,
Koonda
|
|
|
|
|
You can bind your repeater to an ObjectDataSource control, which is configured to use a method that takes 5 parameters. Then use ControlParameter controls within the ObjectDataSource, each configured to pull a value from one of the listboxes. Use AutoPostBack=true on each listbox so that a change in any will trigger a postback, refresh the ObjectDataSource, and redisplay data in your repeater.
That's one way to do it.
|
|
|
|
|
Thanks Mike Elison,
But I need some code examples. I am not using any code to get this project done. I am just draging the Listbox controls and a Single Repeater. I just change some html in the aspx file for the Repeater Control to get the values. Could you please send me some code to bind all the 5 Listbox Controls to the single Repeater Control to display information to the user
I realy appreciate your help.
Thanks
Koonda
|
|
|
|
|
koonda007 wrote: But I need some code examples. I am not using any code to get this project done. I am just draging the Listbox controls and a Single Repeater. I just change some html in the aspx file for the Repeater Control to get the values. Could you please send me some code to bind all the 5 Listbox Controls to the single Repeater Control to display information to the user
Nope. Databinding to a control like the Repeater is such a ubiquitous task - you need to understand it if you're going to get anywhere as an ASP.NET developer working with data. You need to look into the ASP.NET tutorials at:
http://www.asp.net/learn/default.aspx?tabid=63[^]
- the data tutorial particularly. And you'll want to look into MSDN documentation[^] on the topic.
I tell you what... look over all the material on those links. If you still have questions on displaying data in your Repeater (using values from 5 controls as parameters) post your question again.
|
|
|
|