|
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
|
|
|
|
|
When the document is rendered into the iframe, it is handled by the Word browser add-in, which runs exclusively on the client machine. At that point, your document is also wholly contained on the client side, with no connection back to the server. If the user saves the document using the Word add-in, it will save to the client machine. In order for you to get those changes back to the server, you'll have to provide a way for the user to upload the document back to the server. One thing to be aware of is that a workflow like this opens you to all sorts of concurrency issues with multiple users editing the same document at the same time.
You may wish to reconsider the design and steer clear of Word documents, or think about purchasing a 3rd party library that would allow you to parse/render the content of a Word document as XHTML, which you could provide an editing experience for in your application, without having to rely on the Word add-in.
Hope that helps a bit.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hello Jesse Thanks for giving such a quick and valuble reply to my question.
And now, plz can you suggest me any 3rd party lybrary to serve the purpose.
Regards
sai
|
|
|
|
|
I'm afraid that I've never had to do anything similar and don't know of any off the top of my head. Your best bet is to cuddle up to my wise uncle Google for a bit, download some trials, and see what works best for you.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
|
Then I would suggest that you perform some tests.
I'm afraid that we seem to have crossed from the area of "please help me figure out this concept" to "can you do the legwork for me?" I'm happy to try and help with the former, but you are on your own for the latter.
I wish you the best of luck.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
Hi All,
I am using Asp.net 2.0, I am trying to deploy my application using the publish website wizard. The project contains 4 forms. By using the Publish wizard I managed to create 1 dll. But the dll name is differ from the Project Name. But in Asp.net 1.0 , the dll name is in the form of project name. How can I change the DLL Name in Asp.net 2.0..
Thanks in Advance
Dana
|
|
|
|
|
VS2003 (.NET 1.1) came with the "Web Application" template which compiles the UI code behind into 1 dll.
VS2005 (.NET 2.0) came with the "Web Site" template which compiles code in multiple dll's, depending on the size of the project.
If you still want the "Web Application" template, MS have made the template available for VS2005: Web Application template[^]
|
|
|
|
|
hello frnds,
i have a page having labels in English language. i have a language combo and it containing some languages. so if i select france their then all the lable should be change to French language....
MSDN suggest cultural Info class for the same.
how can i do it ????
any example ???
thankx
Koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
As I consult my crystal ball[^], I see many answers[^] to your question. Some, on this very site.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
|
|
|
|
|
I have 3 user controls in a Asp.net page with tabs. In tab control I used asp.net server side button for tab navigation. In these 3 module ,one user control elements are dynamic.
I am creating textbox,c heckbox,dropdownlist dynamically with database value. 288 dynamic controls in that page.
While tab navigation, the dynamically created controls are losing values.
How to set view state for dynamic controls (these 288 controls)?
modified on Thursday, March 27, 2008 8:27 AM
|
|
|
|
|
Hi,I got answer myself,
While creating dynamic controls
controlName.EnableViewState=true;
give like this.
|
|
|
|
|
ViewState is restored between the Init and Load phases of the page life cycle. One thing to be aware of is that controls are given their ViewState based on position in the control hierarchy, not on a control's id.
What that means to you is that in order for your controls to receive ViewState, they must be recreated during the Init phase [either in an Init event handler or in the OnInit method]. You will also need to make sure that the control exists in exactly the same place in the control hierarchy as it did when the page rendered.
Hope that helps.
--Jesse "... the internet's just a big porn library with some useful articles stuck in." - Rob Rodi
modified on Thursday, March 27, 2008 8:54 AM
|
|
|
|