|
I'm trying to build a custom control and I'd like to access some funcionalities of ClientScriptManager defined as internal on System.Web.UI
Here is a sample code:
namespace MyWebControls {
public class MyGridView : System.Web.UI.WebControl.GridView {
...
protected internal virtual MyMethod(object pLiteral) {
...
var vLiteralName = ClientScriptManager.GetScriptLiteral(pLiteral);
...
}
...
}
}
I've tryied also:
var vLiteralName = this.Page.ClientScript.GetScriptLiteral(pLiteral);
The functionality exists but is defined as internal. How can I access it?
Maybe some property on the Assembly. Change the namespace. I've tryied several things.
Please give me some light.
Thanks.
|
|
|
|
|
If the function you're trying to access is marked internal, it's only accessible from within the same module:
From HELP:
The internal keyword is an access modifier for types and type members. Internal types or members are accessible only within files in the same assembly.
A common use of internal access is in component-based development because it enables a group of components to cooperate in a private manner without being exposed to the rest of the application code.
For example, a framework for building graphical user interfaces could provide Control and Form classes that cooperate using members with internal access. Since these members are internal, they are not exposed to code that is using the framework.
It is an error to reference a type or a member with internal access outside the assembly within which it was defined.
|
|
|
|
|
|
Hi All,
does anyone know how to assign ownership of files and folders?
i have the code to take ownership myself, but can't figure out how to assign ownership to someone else - but i can in the GUI(Vista)!!
There are other 3rd party apps which can do it (setowner.exe) but i wanted to build my own so i can have extra functionality.
i have found this article:
"One of the security constraints of NTFS/NT is that you are only
allowed to set the owner of a file to yourself (e.g. "take ownership")
or to the "Administrators" group. However, there is a "side entrance"
whereby you can assign any arbitrary user as the owner, even if
they're not an administrator. This is a privilege that is *granted* to
administrators and backup operators, but NOT *enabled* by default. So,
how do you enable this? Unfortunately there is no native .NET way to
do this"
so my question is, does someone know how to make C# do this?
Many Thanks,
Phil
|
|
|
|
|
My app (which is part c++/cli and part c#) generates bitmaps on the fly, and they exist in memory initially as arrays of unsigned char (width * height * 3 bytes (rbg)).
I need to be able to crop, resize, rotate (90, 180 degrees), mirror and flip these images in an efficient way.
I've previously used GDI+, but GDI+ has some serious threading issues (although it allows multiple threads, only one thread per process actually gets executed by GDI+ at a time).
So i need a replacement image processing library. I looked at CImg, but internally it organises data into separate arrays, one per colour channel, which would make it a headache to get my data into and out of the library.
is anyone familiar with any other libraries which will meet my needs? could be c# or c++, it doesn't really matter.
|
|
|
|
|
Jon Hulatt wrote: only one thread per process actually gets executed by GDI+ at a time
Interesting. Do you have a link to that information?
|
|
|
|
|
|
Do you know that person? I mean that is certainly not authoritative.
I would consider this[^], a more reliable source. Note that he speaks specifically about Vista. I have no idea if previous implementations are identical in this regard.
|
|
|
|
|
Hi u all!!!
I have a website, dedicated to beauty products for women, ok? Sometime ago a friend of mine told me "hey! why don´t you send that info through MSN?". I liked that, so I downloaded an autoresponder code from here:
http://nayyeri.net/blog/auto-responder-add-in-for-windows -live-messenger/
So I simply added this routine to get search results from my site:
public string getSiteSearchResults()
{ string reader = "";
string search = "[the received message text goes here]";
string url = "[the URL of my website search page]?query="+ search;
try
{
WebPermission pWeb = new WebPermission(NetworkAccess.Connect, url);
SecurityPermission pSec = new SecurityPermission(SecurityPermissionFlag.AllFlags);
PermissionSet set = new PermissionSet(PermissionState.None);
set.AddPermission(pWeb);
set.AddPermission(pSec);
set.Assert();
HttpWebRequest URLReq = (HttpWebRequest)WebRequest.Create(url);
URLReq.Credentials = CredentialCache.DefaultCredentials;
URLReq.AuthenticationLevel = System.Net.Security.AuthenticationLevel.None;
URLReq.AllowAutoRedirect = true;
URLReq.Timeout = 60000;
HttpWebResponse URLRes = (HttpWebResponse)URLReq.GetResponse();
Encoding enc = Encoding.GetEncoding(1252);
StreamReader sStream = new StreamReader(URLRes.GetResponseStream(), enc);
reader = sStream.ReadToEnd();
}
catch (Exception ex)
{
reader = ex.Message ;
}
return (reader);
}
So when somebody asks for some product, the addin (working on one of my pcs) do a search on my site, get the results and send ´em in response as plain text.
Well, instead of that, all I get is this:
Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
I read about gacutil, regasm, caspol, trust zones, trusted assembly, security zones...... but don´t have a clue where to start to get rid of this thing, really.
Any help is truly appreciated
Txs in adv
Ariel
|
|
|
|
|
|
bhargava2409 wrote: hi,
I am Trying to Design a 3D Auto CADD viewer is there any one know coding to how to design that.
I think you have a typo in that. should it not read...
hi,
I am Trying to get somebody else to design a 3D Auto CADD viewer is there any one know coding to how to design that.
If you want to 'try' to do something then the key is to 'try' to do it
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
bhargava2409 wrote: 3D Auto CADD viewer is there any one know coding to how to design that.
Yes. I do.
My fee is 1 trillion GBP. 50% deposit payable in advance. If you would just be kind enough to post your bank details so I can withdraw my fee I'll get started.
Simon
|
|
|
|
|
|
bhargava2409 wrote: less talk more work
I don't work for you, I'll do what I like thanks.
If you ask questions sensible and politely I'm sure you'll get sensible answers.
What you are talking about is a large scale project. If you don't have the expertise to do this yourself I suggest you either buy a component that you can use to provide the needed functionality, or you can find a developer/team of developers who you can pay to guide you.
I'm quite happy to answer specific questions you might have, but I'm not going to provide a full design and implementation of a large system for you, or guide you in how to go about developing one.
Simon
|
|
|
|
|
hi,
I am trying to include a Solid works image to my c# Project.Is there any chance to include that or is there any way to show solid works image in the .net projects.
|
|
|
|
|
So solid works in a 3D modelling program? you want to put an image in you application? What format is the image? Are you using windows forms? if so many of the controls have a BackgroundImage property. Also you could use a picture box which is specifically designed to display images (thou not the best control I might add).
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
yes,I am tying to view an solid works image which have extensions like SLDPRT,SLDSM in my .net project I think what You have sujjested doesn't work for my requirement.
|
|
|
|
|
hi
i need to use a solidworks image in c# i need source cod can you help me about this topic?
|
|
|
|
|
hi can we get the code for reteriving the image from sql data base using browse button
Shomic goyal
|
|
|
|
|
hellow i also need same code
can anubody help us plzzzzzzzzzzz
|
|
|
|
|
you both on the same course? and the answer to your questions is of course - no, you cant have the code.
Look into the System.Data.SQLClient classes and give it a go yourselves.
And might I suggest a better explanation of your problem too
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
i am sorry i have one code for reteriving the image form data base but at present it not working so can i have the another option for that
|
|
|
|
|
Well as i dont know what your code is how can i possible know what the 'other' option is?
I would hate to give you the same option you are already using.
Why dont you post you code and detail the error you are getting and we can try to help you from there
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Inserting
------------------------------------------------------------
ms = new MemoryStream();
pbEmp.Image.Save(ms,System.Drawing.Imaging.ImageFormat.Jpeg);
byte[] data = new byte[ms.Length];
ms.Position = 0;
ms.Read(data, 0, Convert.ToInt32(ms.Length));
cmd.Parameters.AddWithValue("@Photo", data);
Retrieving
------------------------------------------------------------
byte[] data = (byte[])ds.Tables["tablename"].Rows[0][0];
ms = new MemoryStream(data);
picturebox.Image = Image.FromStream(ms);
|
|
|
|
|
i have 2 tables named : Customers, Orders which have relation together (Customers table is Parent table).
Now in my form, i have 2 DataGridView which display list of customers (in dataGridView1) and list of orders of selected customers (in dataGridView).
i wrote this code, but at runTime all orders display to dataGridView2 and when i change customer record, nothing happend!
here is my code :
TestDataSet ds = new TestDataSet();
private void Form2_Load(object sender, EventArgs e)
{
TestDataSetTableAdapters.CustomersTableAdapter cA = new TestDataSetTableAdapters.CustomersTableAdapter();
cA.FillCustomers(ds.Customers);
TestDataSetTableAdapters.OrdersTableAdapter oA = new TransactionalUpdate.TestDataSetTableAdapters.OrdersTableAdapter();
oA.FillOrders(ds.Orders);
dataGridView1.DataSource = ds.Customers.DefaultView;
dataGridView2.DataMember = ds.Orders.ParentRelations[0].RelationName;
dataGridView2.DataSource = ds.Orders.DefaultView;
}
can anybody help me to solve this problem ?
Thanks
|
|
|
|