|
I have a master page and it has one dropdownlist. I has two items. Is this possible that
in content page I can create the instance of this master page and get value of it's selected item in drop0downlist.
e.g mymaster.master is my master page and it has one dropdownlist
and in content page.
myMaster varr = new myMaster();
How can I grab the value of selected item in content page.
|
|
|
|
|
You need to set the @MasterType Directive and the you should be able to access it through the page.master property in your code behind.
Hope that helps.
Ben
|
|
|
|
|
I need to add to my website application the ability to receive up to
30K of XML data from a Windows client application. I know I can use an
XmlTextReader() to receive the data and put it into the cache. What I
am mostly not sure about is how the website is supposed to know that a
client is wanting to connect and send data. Do I set up a polling thread using a Listener socket to check for a connect request or is there a better way?
I have gone through books and web searches trying to find the best way
to send data from my client to the website, but most scenarios
seem to be the server sending data to the client. Any suggestions
would be greatly appreciated.
Craig
|
|
|
|
|
Just create a specific web page for the windows app to send the data to.
Then use the Request object to get the stream. Once you have the stream you can put it into an xml doc or whatever. All this code can go in your page load of that page.
I have some code that does this for cXML transactions. I can post it if you think it would be helpful.
Ben
|
|
|
|
|
For anybody who is having the same problem I was having, I solved my problem by attaching an asmx page to my website and simply using a WebMethod that takes a string as an argument. All I have to do is call this method from my client windows application passing it a string of data points. My WebMethod then writes the data to a file where my webpage reads it before displaying. Very simple, but difficult to find information on how to do this. I didn't know that an asmx page could be attached to a website that is not originally a web service unitil I just plain tried it. I guess that makes it a webservice/website. I am in the early stages of learning ASP.net. I hope I am doing this in a practical way. Only time will tell.
Craig
|
|
|
|
|
I have to design a usercontrol in asp.net, which will display image in table.
how do i place the image in usercontrol? how will i use it in html, and display in browser?
|
|
|
|
|
You import it into your aspx, and use it the same as you would any server control.
You would put the images on your server, and put the path to them in your user control, in the markup.
<%@ Register TagPrefix="anyPrefix" Src="~/pathtoascx" TagName="thecontrolname" %>
Then <anyPrefix:thecontrolname runat="server" id="wahtver"/> with create the control.
This stuff is covered in any book on ASP.NET, I recommend buying one and working through it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks for the update,but my problem is different..
i have a usercontrol which displays
student name
school name
link to different page
i want to write a code which would show this information one below the other like within table, and image in the background,
|
|
|
|
|
Hi.
I have a webservice - and I want to make sure that only MY application is using it.
Is this possible, in a secure way?
Thanks,
Cormac
|
|
|
|
|
|
Thanks.
Unfortunately, those techniques rely on username and password credentials. I need to prevent my users from being able to build their own applications andthen using my web service with their username and password.
Regards,
Cormac
|
|
|
|
|
Instead of using the username and password of the users, you can have a username hardcoded into your application. The users will not be able to get the username unless they have access to the code and even if they have access to the code, the password could be encrypted.
|
|
|
|
|
Thanks for your suggesstion.
However, this is not a solution; it is too easy to decompile .NET applications. Encrypting a password just introduces another problem: the encryption key and how to 'hide' that. Hardcoding is not the answer.
Unfortunately, I can't forsee any satisfactory solution.
|
|
|
|
|
Your other option is to see if you can get the IP address of the incoming request, and validate it. Of course, your users can decompile your code and change any checks you do, so.....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yeah, plus my application needs to be usable from anywhere. I am implementing username/password authentication, but I'm worried my users could create their own application and utilise the web service (using their creddentials), and do some malicious things.
In all honesty it'd probably never happen - but it's discouraging not to be able to solve this problem.
|
|
|
|
|
Then you have to defend your application from dodgy input. You have to ensure that your webservice is strict on validating the inputs. That will minimise any damage that may occur if someone does find a way through the authentication process.
|
|
|
|
|
Other than these suggestions you can restrict accepting IP's from IIS:
Property of Directory in IIS----> Directory Security----->Edit button in IP address and domain name restriction
Mazy
"This chancy chancy chancy world."
|
|
|
|
|
Hi,
I have a gridview control on an ASP.NET page which I want to populate by binding an array of items to it. The items were all strings so it was easy to do, just have columns with bound fields and setting the DataFields to the property names like this:
<asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="false" >
<Columns>
<asp:BoundField HeaderText="Product" DataField="Name" />
<asp:BoundField HeaderText="Description" DataField="Description" />
</Columns>
</asp:GridView>
I now need to add a new item and it consists of an object with a few strings as properties. I'd like to do this but I can't of course:
<asp:BoundField HeaderText="Product Code" DataField="Product.Code" />
...where the Product is the object and Code is a string member.
How can I do it? Do I need a template? If so, how?
Thanks
|
|
|
|
|
|
Try this:
<asp:TemplateField HeaderText="Product Code">
<ItemTemplate>
<asp:Label ID="abc" runat="server"
Text='<%# Eval("Product.Code") %>'>
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
Evil cannot be conquered in the world... It can only be resisted within oneself.
|
|
|
|
|
The first time any application I write tries to consume a webservice I always encounter a substantial delay. Typically the delay is about 15-20 seconds. Any subsequent calls are very fast. It seems as if under the hood there is some sort of initialization process perhaps?
Can anyone tell me what is going on here and if there is a way to speed thus up? If it helps, I'm using C#, VS2005. I have this problem on any machine I develop on and any machine I run my compiled app on.
Thank you!
|
|
|
|
|
hdv212 wrote: network host="mail.yahoo.com"
You can't use mail.yahoo.com unless you have a paid account with yahoo(The smtp host name may defer for the paid accounts). Try using the smtp host of your company, it should work.
|
|
|
|
|
Well, since he deleted his original post, I guess you hit it right on the money.
Ben
|
|
|
|
|
Hi Developers
From where I can download "Live Chat" project which can be easily integrated with my existing Web Ap.
Lets work it Out.........!
|
|
|
|
|