hi all so I thought WCF could call web services too. Is this true? or is it either WCF OR Web services? if you CAN call a web service through WCF, how would you configure its ? I have this all configured and my WS is running, & my proxy instantiates fine too (meaning it doesnt return null), but when I make a call to a method in my WS. it says "Object reference set to null". Or do I have to create a different proxy for the web service? is that the difference between WCF & WS? thanks in advance! Moazzam -- modified at 3:30 Saturday 30th June, 2007
moazzamahmed
Posts
-
Calling a webservice using WCF? [modified] -
How to read the servicemodel client section from the web.config file?I need to programatically read the endPoints within the client section in asp.net, how do I do that? so basically I need to get the name & the address in this endpoint. thanks.
-
How to prohibit repeated passwords in default membership?but where do we save the passwords? and how do you compare them? they're hashed.
-
How to prohibit repeated passwords in default membership?hi all I've implemeneted microsofts default membership provider, everything works great. I need to restrict users from changing their password to a password they already used in the last x months. Does anyone know how the default membership provider can do this? If not, any ideas on how to implement it? we have passwords hashed, so we cant really store em outside of aspnet ourseleves. thanks in advance. moazzam
-
<form> on masterpage and user controlsthanks for the response. I tried to read the fields from the control but it wouldnt work, then all of a sudden it started to work. cause yeah I understand the user control shouldnt be dependent on anything else, or it breaks. I also found out, you dont use POST to transfer stuff anymore, just do postbacks, then transfer via response.redirect using querystring. did I get that right? thanks!
-
<form> on masterpage and user controls:omg: ok so I didnt think this would be such a big deal, but Im having trouble (errors etc.) accessing a
on a masterpage, within a user control: 1. masterpage has
2. then I have a aspx page that inherits from this master page, I have
3. the user control's code-behind has if (!Page.IsPostBack) { RadioButtonList rblLocationHandle = (RadioButtonList) frmAddLocation.FindControl("rblAddLocation"); if (Request.Form["rblAddLocation"] == null) ... etc. but when I run the page, it says "frmAddLocation" is not valid in this context. So how do you access a form thats on the masterpage, in the user control? also, when my default.aspx page, which is part of ANOTHER masterpage, posts to the AddLocation.aspx page, Request.Form["rblAddLocation"] is always null! but Request.Form[4] isnt! how come? thing is, when I use [4], and I go to AddLocation page directly, meaning without a post, it bombs on [4]. now, I can catch it, and move on, but what the heck is going on? how do you use on master pages and user controls? thanks in advance! Moazzam
-
formview DeleteParameters is always 0 asp.netI dont know why the markup didnt show. ok so, deleteparameters is like this: asp:Parameter Name="objectiveentryid" Type="Int32" / Im not defining datakey/datakeynames anywhere. My formview is coming from an objectdatasource, which in turn hits up a static class. The edit & insert works fine, the delete doesnt. where is it picking up the delete param? email me at moazzam at irw.org if you like and we can by-pass having to write here. I could even email you my code. thanks a bunch man -- modified at 3:24 Friday 2nd June, 2006
-
formview DeleteParameters is always 0 asp.nethi all, ok so I have a formview. Insert and Edit work just fine. But for delete, it gets called but the parameter is always 0. Here's the code, what am I missing? I put a stop in my delete method, public static DataSet Delete(int objectiveentryid) and the parameter is always 0. Where should the delete function pick the paramter from? I have this as the formview templates:
Entry ID:
<%# Eval("objectiveentryID") %>
Objective:
<%# Eval("objective") %>
etc.
Check here for errors
-
dropdownlist with manual text entrythanks man!
-
dropdownlist with manual text entryhi all so is there a control that will allow you to either select from a dropdownlist but also let you type in a NEW item on top? What control is that? Ive seen these on websites. I need my users to be able to select from the drop down, but if the item of their choice doesnt exist, they can just type it and hit "add" and it'll add to the wish list. Or do I need to add a separate textbox and imitate this behavior? thanks Moazzam
-
Binding objectdatasource to an objecthi all, ok so I have an object in my business layer. With constructors, properties and methods. How do I bind an objectdatasource to my object? say the constructor? pass in an ID to it that would fill the object and in turn the ODS. And then bind the insert, delete and update tabs to appropriate methods of the object. is this possible? thanks M
-
How to get value of properties interatively?thanks. I figured it out, its actually pi.GetValue(this, null) but you have to check for null before you run it. M
-
How to get value of properties interatively?hi all I have this code: foreach (PropertyInfo pi in this.GetType().GetProperties()) { if (pi.Name != "Ds" && !pi.Name.Contains("nmv") && !pi.Name.Contains("Nmv") && pi.Name != "NewId" && pi.Name != "SpeakerID") nmvParams.Add("@" + pi.Name, pi.ToString()); } "this" is my object that contains all the properties. I need to put the name & values of each property into a namevaluecollection nmvParams. pi.Name gives me the name of the property. How do I get the actual value? pi.ToString() just gives me the name of the property in string. thanks M
-
Loading selected value from bindinghi all, ok so I have a formview thats bound to an objectsource. within the formview, I have a listbox that I added myself. Item 1 Item 2 Item 3 how do I set the right value selected within this lisbox? all other values on textboxes is being set with Text='<%# Bind("objective") %> but it wont allow me to put this binding on listitems. any ideas? thx M
-
Common tasks in base classes, how?dude, that was perfect, it worked. thanks! Moazzam
-
Common tasks in base classes, how?ok next q ... how do you access inputs into a constructor within the base class? my base class constructor: protected int commonID; // this is common to all object public BaseClass{ console.write commonID; // or something that accesses id } my sub-class constrictor: public myClass(int id) { commonID = id; } but when I instantiate "myClass", before it sets commonID, it goes to the BaseClass constructor. But commonID is null cause it hasnt been set. So is there a way for me to get "id" into the baseclass? or get commonID set? M
-
Loading class objects from datasetshow? is there an example somewhere out there?
-
Loading class objects from datasetshi all, My business layer contains 1 object per table in my database. Object properties are the same as table fields. I get a dataset with 1 row back from my database when I instantiate my objects. Is there a way to load this dataset into my object properties (fields)? without having to traverse and match the nodes on the dataset to my properties? this way, I can use the same method for all my objects AND I dont have to worry about the function if I change my object or table. any ideas? thanks M
-
Base Class or common static method?yeah thats what Im doing: I have overloaded functions that do Gets, Insert, Deletes and Updates for ALL tables. My question was: where should I put these overloaded functions? in a base class or as common static methods in another class called Utils? I realized base classes are only useful for object classes, meaning non-static instances. And also, in my business layer, I do have one class for each table which becomes an object. These table objects then use my data layer to get, insert, delete and update. pretty clean huh! :) M
-
Base Class or common static method?I cant figure out when to use base classes and when to use common methods that just take in different parameters and do the same task, instead of having 1 method for each of my objects. ok so in my data layer (3-tier enterprise web solution), I have 4 classes: mygets, myinserts, mydeletes, myupdates. Each of these hit the database and do the appropriate work for 7 of my tables: tb1, tb2, tb3 ... tb7 mygets has these methods gettb1(tb1key), getAlltb1, gettb2(tb2key), getAlltb2 ... tb7 each returns a dataset myinserts takes all fields for tables (as sql parameters) and adds them: addtb1(field1, field2 ... ), addtb2(field1, field2, ... ) etc. same for myupdates and mydeletes. whats the best way to structure having to code the least, and have it consistent: base classes which have the common functions for each of these 4? or static methods that basically take in different parameters and get the same stuff done? which is more efficient? related question: are base classes just a better "location" to put common methods that can be used by a lot of classes? classes that derive from them? thanks M -- modified at 2:09 Tuesday 4th April, 2006