|
Girish481 wrote: I just drag and drop ScriptManager from Ajan Extensions from toolbar and got the solution.
You don't even know what it's called. Could you explain how it works and how it's doing what you wanted it to do ? If not, how will you know what to do when you want to change what it does, or if it starts to affect the performance of your site ?
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Is it not for only AJAX ? is it available for .net 2.0
Education is not a way to escape poverty — it is a way of fighting it.
|
|
|
|
|
just try to use
Response.write("alert('YOUE Message')")
hope it helps
regards
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hello,
I have developed website in VWD 2008 with asp.net. In design view, I put labels control inside the interface area. But when I run it, it does not locate in the correct position. You can see at www.nbgroup.info. I put the "Count Visitor & DateTime" under the "What's New?" but it does not. So, how to solve this problem?
Thanks,
Chuon Visoth
Angkor Wat - Cambodia
asp.net - c sharp beginner
|
|
|
|
|
The designer is rubbish. Never, ever use it. Use CSS to position your elements, and run the site to see how they are looking.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Is it possible to use a connection string without storing it in the web.config with the asp .net membership provider? Same for role and profile... thanks.
Revolutionary: Disk drives go round and round.
|
|
|
|
|
Au sh*t, I noob forgot to wright in english, sorry guys --> I'll translate it in Google for you non-german speeking guys.
Situationsschilderung:
Ich habe auf einer neuen Website in einem Ajax Updatepanel - das auch hervorragende Dienste leistet - verschiedene Steuerelemente plaziert, unter anderem eine Listbox und einen Haufen Buttons. Dies sei nur am Rande erwähnt, vielleicht hat mein Problem ja was mit AJAX zu tun.
Meine 1. Frage ist:
Wenn ich auf der Seite ein Postback auslöse, indem ich zum Beispiel den Button drücke, werden dann in der Form alle Variablen wieder initialisiert, oder werden die Variablen in dem Zustand wie sie vor dem Postback waren beibehalten?
Hierzu ein kurzes Beispiel:
Nehmen wir an, ich habe folgendes Problem:
Dim Path as String = "C:\StandartPath"
Dann setzt der User die Variable Path z.b. durch eine Textbox auf folgenden Wert:
Path="C:\NewTextBoxPath
Der User entscheidet sich nun spontan auch die Variable Username zu ändern:
Er klickt auf einen anderen Button und ändert seinen Username - Er erzeugt also einen erneuten Postback.
Welchen Wert hat nun die Variable Path?
2. Frage:
In meiner Webseite in dem Ajax-Updatepanel befindet sich eine Listbox. In dieser kann man ein Element auswählen, und dann mit dem Button das entsprechende Element löschen. Wenn man nun ein Element wählt, und den Button drückt wird das gewählte Element aus der Listbox aber schlagartig wieder deselektiert und es gibt logischerweise eine Fehlermeldung. Woran liegt das? Es sollte doch auch nach dem Postback das selektierte Element noch als solches gespeichert werden, oder täusche ich mich?
English
situation description:
I clicked on a new site in an Ajax update panel - which also provides excellent services - different controls are placed, including a list and a bunch of buttons. This was only marginally above, perhaps my problem has something to do with AJAX.
My 1st Question is:
If I were on the side to trigger a post back by saying, for example, the button press, then in the form of re-initializes all the variables or the variables in the condition as they were before the post back were retained?
This is a short example:
Let's say I have the following problem:
Dim path as String = "C: \ StandartPath"
Then the user sets the variable Path e.g. through a text box on the following value:
Path = "C: \ NewTextBoxPath
The user chooses spontaneously even now the variable username to change:
He clicks on another button and change his user name - so he created a new post back.
What value has the path variable
2nd Question:
In my website in the Ajax Update Panel is a listbox. In this you can select an item, and then with the button delete the item. If you now select an item and the button is pressed the selected item from the listbox but abruptly deselected again and there is logically an error. Why is that? There should be but also after the post back the selected element or stored as such, or am I mistaken?
|
|
|
|
|
Achtung !!! Wie kanst nich das Deutch sprechen !!!!
Translated version ( from babel fish )
Situation description: I have new website in a Ajax update panel - which carries also outstanding services out - different control members places, on among other things a cunning ruse and a heap of button. This is mentioned, perhaps only at the edge has my problem which with AJAX to do. My 1st question is: If I on the side post office-bake releases, by pressing for example the button, then in the form will all variables become again initialized, or the variables in the condition like them before post office-bake were maintained? For this a short example: We assume, I have the following problem: Dim Path as stringer = " C:\StandartPath " Then the user sets the variable Path e.g. by a text box to the following value: Path=" C:\NewTextBoxPath The user decides to change now spontaneously also the variable username: It clicks on another button and changes its username - it produced thus a renewed post office-bake. Which value now does the variable Path have? 2. Question: In my web page in the Ajax Updatepanel is a cunning ruse. In this one can select an element, and delete then with the button the appropriate element. If one selects now an element, and the selected element from the cunning ruse presses the button however is suddenly again deselektiert and logical-proves an error message gives. What does that lie? It should nevertheless also after post office-bakes the selected element still as such to be stored, or is mistaken I?
Babel fish is obviously not much good. So, how about you translate for us ?
I THINK you're asking where variables get their values from ? They are initialised on each postback. ASP.NET is stateless, you need to use the session object to store values between postbacks. If you don't know that, you should probably study ASP.NET in general a little before adding AJAX to the mix.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Sorry guys for not translating by hand.
But I think Christian Graus has answered all my question, thanks. I'll now read some stuff about session-objects, and you are right, I'm not much into ASP.NET, I just started doing so. I normally code only VB.NET Applications, so I thought ASP.NET wouldn't be too hard for me (and it isn't there are just a few new things to remember).
And I use the Visual Web Developer, so working with AJAX in a very basic way is so easy to use, it's just some Drag-Drop activity
|
|
|
|
|
I'm glad I helped. ASP.NET AJAX is easy, b/c you get given a black box. But, it's good to understand what AJAX is, and what it's doing, so you understand the performance impact of using it, especially as the MS library is not very efficient. That's assuming you have a site under some sort of load, if you only have a couple of users, it probably doesn't matter.
ASP.NET isn't too hard, the stateless paradigm is the main thing to get a handle on, and the fact that any events that you fire, fire between page load and page prerender, the other trap is to do stuff in page load, such as databinding, and then find you press a button, and the change is not visible ( b/c you bound to data BEFORE the event fired )
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
I am binding the same gridview to excel or text data based on user selection, and passing the dataview in session to different page for further analysis. It works fine when the user selects excel data; but in case user selects text data, it shows Null Reference exception in another page. Code is as follows:
protected void Button_view_click( object sender, Eventargs e)
{
if(....=="Excel")
{
BindExcel();
}
else(.... == "text")
{
BindTExt();
}
GridView1.EnableViewState = true;
dv = GridView1.DataSource as DataView;
Session["DataViewExcel"] = dv;
}
In anothere page, i am using following code :
Private void PageLoad()
{
DataView dv1 = new DataView();
DataTable dt1 = new DataTable();
dv1 = Session["DataViewExcel"] as DataView;
dt1 = dv1.ToTable(); // Exception occurs here, only in case of text data
}
Stack Trace is as follows :
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
PreThesisSoftware.DiscreteDistribution.Page_Load(Object sender, EventArgs e) in C:\Users\Ashutosh\Documents\Visual Studio 2008\Projects\UploadFile\PreThesisSoftware\PreThesisSoftware\DiscreteDistribution.aspx.cs:23
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
|
|
|
|
|
And which line is line 23 ? Have you used the debugger to step through this code ? What have you done to diagnose the problem ?
The error means what it says, you're using an uninitialised object somewhere. Probably dv1 = Session["DataViewExcel"] as DataView;. The reason to use 'as' is that if the cast is not valid, you get null back. Using 'as' and not checking the return for null, is bad programming.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
if(Session["DataViewExcel"] !=null){
}
living none stoping.
|
|
|
|
|
I am attempting to populate a ListBox with the names of users that belong to an AD Distribution List. This was working previously, but the scope of the site has changed and I now need to include multiple groups in this List Box. I put the three groups into a new group, and changed my code to pull the members of that group. The list box is now populated with the three subgroups instead of the members of each group.
Here is the code I am using:
Dim Groups As New DirectorySearcher
Dim GroupSearchRoot As New DirectoryEntry("LDAP://OU=Something,OU=Something,OU=Something,DC=Something,DC=Something")
With Groups
.SearchRoot = GroupSearchRoot
.Filter = "(&(ObjectClass=Group)(CN=SomeGroup))"
End With
Dim Members As Object = Groups.FindOne.GetDirectoryEntry.Invoke("Members", Nothing)
For Each Member As Object In CType(Members, IEnumerable)
Dim CurrentMember As New DirectoryEntry(Member)
AuthMan.Items.Add(CurrentMember.Name.Remove(0, 3))
There is probably a very simple way to do this I am sure, but I am not thinking of it or finding it anywhere.
Thanks in Advance,
Norris
|
|
|
|
|
Here you Go
Get User Group Memberships
and if you are interested read the whole article. It is an Excelent article on AD.
Cheers!!
|
|
|
|
|
This article looks like it will be very useful for a variety of things. Thanks for the link, it is now bookmarked.
I am not seeing anywhere in it however that goes over getting the members of a group. The part of the article linked above will return me all group memberships a specific user has if I am undestanding it right. I have a group that contains three groups, and I want to populate the list box with the members of all three groups. The code I posted above works fine if the group directly contains user accounts, but when I use it on a group that only contains groups, I get back the subgroups instead of the user accounts.
|
|
|
|
|
Hi All,
When attempting to write or delete a file in the Application_Start event of Global.asax I receive an "Authentication Required" message box requesting a User Id and Password.
After clicking Cancel on the Message Box I receive the following.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.UnauthorizedAccessException: Access to the path "D:\hshome\mtbvfr\casas-y-terrenos.com\MapPathTest2009-06-17T21-48-03.txt" is denied.
ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user.
To grant ASP.NET write access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
The same code works fine in the Application_BeginRequest event.
My ISP uses the H-SPHERE control panel. The "Authentication level" is set to Anonymous. "Allow read access" and "Allow write access" are both checked.
Do I need to request my ISP to allow ASP.Net access to my directories or is there some other solution?
Thanks in advance,
Michael
Hospedaje Los Jardines & Sacred Valley Mountain Bike Tours
http://www.machawasi.com/
Cusco Database Development and Cycling Services
http://databaseservices.blogspot.com
http://serviciosdeciclismodelperu.googlepages.com
Cusco Travel Services
http://www.cusco-travel-services.com
|
|
|
|
|
I m working on window application in vb.net. where i need to Align a paragraph in rich text box. dont know how to do it as RichTextBox control provides three alignments, Left Right & Centre.
I need to align a paragraph in RichTextBox to Justify(strech each line to fit in text area), as it is in Microsoft Word application.
This is an urgent requirement. I would be greatful for immediate response
Raghvendra
|
|
|
|
|
Hi
I need to pass Popup window values to parent window.
my code is :
Response.Write("<script language='javascript'>{window.opener.document.getElementById('ctl00$ContentPlaceHolder1$txtRecipients').value += '" + MobileNos + "'}</script>");
The Above code is working fine with IE..
But it is not working with Firefox Browser ?
i tried with FireFox 2.0 & 3.0 version..
murali krishna
|
|
|
|
|
for firefox,
use the both NAME and ID property for control , keep both same
IE run with only ID.
window.opener.document.myForm.myField.value = myValue
hope it helps
regards
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hello,
Thank you for reading this post. Here is my situation. I am new to AJAX development. I have a gridview with 4 boundfield columns and 1 buttonfield column. I need to display a popup anytime a user hovers over the buttonfield column and popup a panel which has some database driven text and a button which says "Add this to my plan" and a cancel button on the popup. How do i associate a hovermenu extender to a buttonfield column with targetcontrolid? Does the hovermenu controller need to be associated in the rowcommand of the gridview? How does this need to be done. A code sample or a URL where someone has already done this will help my cause mightily ! Here is the code of what I have
<asp:UpdatePanel ID="updPanel" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<ASCPWebC:GridView
ID="gvProducts" runat="server" DataSourceID="odsProducts"
OnRowDataBound="RowDataBound" AutoGenerateColumns="false" AllowPaging="true" AllowSorting="true"
CssClass="datatable" CellPadding="0" CellSpacing="0" BorderWidth="0" GridLines="None" >
<Columns>
<asp:BoundField DataField="FieldA" HeaderStyle-CssClass="first" ItemStyle-CssClass="first" DataFormatString="{0 }" HeaderText="Field A" SortExpression="ORDER_DATE" />
<asp:BoundField DataField="FieldB" HeaderText="Field B" SortExpression="FieldB" />
<asp:ButtonField CommandName="SelectDescription" DataTextField="FieldC" HeaderText="Field C" SortExpression="FieldC" />
<asp:BoundField DataField="FieldD" HeaderText="Field D" SortExpression="FieldD"/>
<asp:BoundField DataField="FieldE" HeaderText="Field E" SortExpression="FieldE"/>
</Columns>
</ASCPWebC:GridView>
<asp:Panel ID="Panel1" runat="server">
<% --Here is popup panel,this needs to have some text and an add button,cancel link -- %>
</asp:Panel>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="cblTest" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
Any and all help is much appreciated.
Thanks
RH
|
|
|
|
|
I have master page with a search textbox and imagebutton that submits the search query using the postbackurl property. My problem is that on any page that is based on this master page the default button is always the search imagebutton, even if a textbox with another button in the contentplaceholder has the focus. My question is how do I set the default button of the page from within the master page to point to a button in the contentplaceholder? This is complicated by the fact that the button I would like to be the default is not always named the same on the pages that are derived from the master page and that I have quite a few pages that have this issue and I would greatly prefer not to have to change code in all of the pages.
|
|
|
|
|
Put the button on the master page inside an asp:panel. Set the default button of the panel.
I didn't get any requirements for the signature
|
|
|
|
|
|
you write codes follow
living none stoping.
|
|
|
|
|