|
|
Hi I am new to .net .
In my application I need to create xml file dynamically with 2 nodes.
Thanks
some
smile
|
|
|
|
|
And the problem is????
only two letters away from being an asset
|
|
|
|
|
That he lost the url to Google?
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
You can use XmlTextWriter class for this.
You need to import System.Xml namespace for this
|
|
|
|
|
Any number of methods can be used. But without more information making any suggestions is useless.
only two letters away from being an asset
|
|
|
|
|
What exist free ASP.NET *.pdf and/or *.doc viewer components?
Leave, please, references.
Thanks, Vitaly.
|
|
|
|
|
Try googling...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Is this possible? I would like to start some experiments using my own DAL, but was wondering if the was a way to bind directly to my entity objects, without coupling through an ObjectDataSource.
|
|
|
|
|
Unless I misunderstand what you're asking, the answer is yes. You can assign any collection that supports the IList interface to a DataSource property and bind the objects it contains without using the ObjectDataSource .
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Yes, with IList you can bind a collection to a data list control, such as a repeater, gridview, etc. but I want to bind single objects to details forms. If I used an IList, I would need some way of telling the form which collection item to bind to.
|
|
|
|
|
It sounds as if you may be talking about a parent-child relationship.
Assuming that I'm right, I would recommend that the child collection was a member of the parent and could be bound easily enough. For example, if I have an object called Library , it may have a property of type List<Book> that contains all books in my library. In that case, if I am binding a collection of Library objects, it is trivial to determine all of the books that are associated with it and bind them as a child-details.
Am I misunderstanding what you're attempting to do?
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi,
I have a problem..like in my project i have 4 dropdownlsit
and i extended the dropdownlist say 3 & 4 with CascadingDropDown..and it works fine..
but the problem is that when i select dropdownlist 1 then the control goes to the asmx method ie,what we mapped for dropdownlist 3...it's an unwanted code execution.....
can anybody have an idea about this......pls suggest me..
alex.
|
|
|
|
|
if i create a text box dynamically in .net page. how to find that text box unique client ID in c#?
for ex, i need to find this id ,
M100_ContentPlaceHolder1_ctl00_textbox
or using the id "textbox", how to find Client ID in JavaScript?
|
|
|
|
|
You'll have to pass the ClientID property of your control from the server-side to the client side. One method to do so is create a variable on the client-side and use the ClientScript.RegisterStartupScript method to invoke a script that populates that variable with the control's ClientID . For example, assume that you have a client script with a variable declared as myControlId . The following server code could be used to populate it:
string script = String.Format("myControlId = '{0}';", myTextBox.ClientID); ClientScript.RegisterStartupScript(this.GetType(), "MyExample", script);
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi
I have two stored procedure in my c# code on the page load
The first one runs and creates a table
The second one should run and insert data into the newly created table
However it says it cannot recognise the table name as a valid object
But when I run the two stored procedures through query analyzer in sql server they work fine.
I think it might have something to do with database rights but not sure
Any suggestions would be great thanks
|
|
|
|
|
That is certainly one possibility. There is an easy way to test that theory. Run the first stored procedure, and then use one of the SQL Server tools to verify that the table exists. If not, then verify that any open transactions have been committed.
Your user will need either the ddladmin or dbo security roles to create a table. One thing that I'd advise is considering an alternative approach. Granting either of these roles to the database user from a website has a detrimental effect on the security of the database. If there is no way to accomplish what you need to do without creating a table, you may wish to consider having the stored procedure impersonate another user with elevated permissions for just that action.
Hope that helps to get you started.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
The user has been set up with db_owner rights on the database
I'm afraid there is no other way to go about my task without creating a table.
The table is being created through the c# code but the insert into the table is not happening
It seems when the table owner is not dbo then I can't insert into the table from my website I can only do it from sql query analyzer
when I create the table through sqanalyzer it creates table with owner as dbo then I can insert into it from my website
Is there a way to get around this?
for example when I create the table through the code to allow inserts into it?
thanks for the reply!
|
|
|
|
|
Previously before I used stored procedures I had the sql statements in my c# code. They worked fine there but as soon as I changed it to a stored procedure it is throwing up this problem
|
|
|
|
|
hrrm... now that certainly sounds like it could be rights issue. Creating the application role and granting it rights would be the first thing that I'd suggest trying.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
You may want to consider setting up an application role within your database, and granting rights to it when you create the table. Make sure that the database user from your website has that application role.
The other option is trickier and takes more work, but you could have the C# code that creates the table, or the associated stored procedure (or both), impersonate a user that does have dbo rights, just for the duration of that call.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi
Can you explain what you mean by
Jesse Squire wrote: You may want to consider setting up an application role within your database, and granting rights to it when you create the table. Make sure that the database user from your website has that application role.
thanks, im bit of a novice navigating around sql server
|
|
|
|
|
Not a problem. I guess that I should first ask whether we're dealing with SQL Server 2005 or SQL Server 2000. I've been assuming 2005. Unfortunately, I don't have a copy of 2000 handy to test with, so if you're using it, you'll have to forgive me, but my information may be slightly off due to the version differences.
If you open SQL Management Studio, and click through to your database, you'll see a folder titled Security . In that folder, you'll see a subfolder called Roles . Under that folder are two subfolders, Database Roles and Application Roles . Database Roles contains the standard SQL Server roles [db_datareader , db_datawriter , dbo , etc].
The Application Roles folder will be initially empty. It exists to hold any custom roles that you use for items in your database. For example, you could create a role called .netman and assign it permissions on specific database objects.
The way I see it, you have a couple of options. You can create an application role for your website, and assign the permissions that you need on objects, for which you'll have to do a grant when creating your new table. You could also simply assign a grant to one or more of the standard roles when you create your new table. For example granting insert to db_datawriter . In either case, you would have to make sure that the login used by your web site held the required role, either built-in or custom.
I suggested using a custom role simply because it allows you more granularity when assigning rights/grants.
I hope that helps to clarify a bit.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
thanks for the rpely, will take a look at that
cheers!
|
|
|
|
|
hi all
My requirement is to show a word document in iframe (or in any thing possible in a web page) and thare i want to edit the content of document and that should be saved agian back.
Here i was able to show word file in iframe and also to edit but, i was not able to save the changes back again.
If any body have any ideas in this regard, plz share with me. Its really urgent.
Thanks in advance
|
|
|
|