|
Hi i have list of values in my dropdownlistbox...,
All those want to be store in my table...,
How to do that?
Ex:
This is my code:
Dim strinsertproc As String
strinsertproc = "submitManPowerDetails '" & Val(ddlContractor.SelectedItem.Value) & "','" & Val(ddlProject.SelectedItem.Value) & "'"
sqlcmd = New SqlCommand(strinsertproc, sqlconn)
sqlcmd.Connection.Open()
sqlcmd.ExecuteNonQuery()
sqlcmd.Connection.Close()
sqlcmd.Dispose()
See in that ddlproject is dropdownlistbox...,
The above code will store which value have selected that one only...,
But instead of that in that what are the values that dropdownbox contains, all the values want to store in my table...,
How to do that one...,
Plz hlp me,
Regards,
Magi
|
|
|
|
|
How do you populate your drop down list? Do you use a stored proc or some other method to populate the drop down list? You will need to change your insert stored proc to accept a varchar and then pass in the values populated in your drop down list via a string array. I am still confused at why you would want to save this information though. Your insert proc should only be inserting what was selected by the user and adding that to your database table. Will the items in your drop down list be changing very often?
Nathan
|
|
|
|
|
hi everybody,actually am having an xml file which contains the links of some 50 images.now i need to retrive the xml file by specifying the url using asp.net ajax through web browser.the images could be intially in thumbnails.
wat would be the better option to do this.?
am new to ajax..pls do help me..
|
|
|
|
|
even i`ll like to do something like this. please let me know..
thx
Kunal
|
|
|
|
|
Hi,
One of my webmethods throw an exception:
System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: The provided Supervisor emailID either invalid or do not exists in the database at ManageEmployeeServices.AddEmployee(Int64 EmpID, String EmpName, String EmpEmailID, String SupervisorEmailID, String LocationName) in c:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\WebSites\ManageEmployeeServices\App_Code\ManageEmployeeServices.cs:line 53 --- End of inner exception stack trace ---
And In my client I want to display only the bolded text as it is the actual error message. So how can I trunctate all the unwanted string from the error message?
Thanks:
Rakesh
|
|
|
|
|
Try this?
[WebMethod]
string MethodName
{
try
{
..Your Code
return "";
}
catch (SqlException ex)
{
return ex.Message;
}
}
So in the event of an error, your method will return the error message, otherwise returns an empty string, or null if you prefer?
|
|
|
|
|
hi,
My intention is to return a dataset from the web method so how can I mention the return type as string?
Regards,
Rakesh
|
|
|
|
|
You can declare the dataset outside of the Try block, and in the event of an error, add an Errors Table too it that contains all of the info. Then check for the existance of that table on the return trip.
|
|
|
|
|
Great! that worked... Thanks a lot.
Rakesh
|
|
|
|
|
hi guys
i have serious problem here, i am embedding a image into a hyperlink as show below,, the onmouseover and onmouseout is working fine in the image properites shown below,,
in the same page i have a button control which will open a pop up window,,as the pop up window is in focus...i move the mouse over to this image.. the onmouseover event is raising for both the image control when i scroll across these two images ... how to solve it, this happens only if i click the button control, otherwise its working fine
winnie
|
|
|
|
|
hai all,
i have develop web application using c# with asp.net....
i need the solution for
"when the pageload the cursor pointout automatically particular textbox "....
if anybody know ...pls reply me with source code....
Thanks And Regards,
vidyasankar
More pain gives More gain
|
|
|
|
|
TextBox1(ID).Focus(); Just call it like this on the page load.
SSK.
|
|
|
|
|
Thanks for your response... i do that but its not working good...
and i got another solution...
(i.e)
Page.RegisterStartupScript("setfocus", " document.forms[0]." + TextBox1.ClientID + ".focus(); ");
its working good...
regards,
vidyasankar
pain gives gain
|
|
|
|
|
Hi,
I'm developing a testing web and want to run it on my local intranet. I've used asp.net 1.1 and sql server database 2000, now problem is that i have a directory named as "Admin" in which i've all the admin pages. I want that no other user can access this directory pages except Admin.
Can anybody tell how and should i do in asp.net and sql server?
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
set the location tag in the web.config for the corresponding folder...
something like this....
location path="Admin"
system.web
authorization
allow roles="Administrators"
deny users="*"
authorization
system.web
location
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
Hi J O N,
Thanks for your help i did the same think but when i login through admin user name it give ReturnUrl=Admin Directory path in addressbar, other users account working properly. now can you tell me what code should be there and database table structure. Please help me
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
| Muhammad Waqas Butt | wrote: now can you tell me what code should be there and database table structure
to secure the pages within a folder in an intranet application that is the way you should have the web.config file settings. so that It will allow only the user's those who are under that particular role.
what is the need for Code and database table structure? Could you please be more specific?
Regards J O H N
"Even eagles need a push." David McNally
|
|
|
|
|
what is the need for Code and database table structure? Could you please be more specific?
Thanks for your help. I wanted to know where and how i should define roles in db or code or both?
|Muhamad Waqas Butt|
waqasb4all@yahoo.com
www.sktech.freewebspace.com
|
|
|
|
|
|
Hi,
I currently have an iframe sat on a classin asp page, this iframe then displays my aspx pages as we are in the process of migration to .net framework.
Currently in the classic asp page I have a javascript function that is called using the iframe onload function, this resizes the iframe according to the size of the content loaded in. It works a treat.
However my issue is how can I call that function again from within in my aspx page, say if the page grows dynamically (i.e. options or validation messages are added). Currently the content gets pushed out the iframe, so I would need to call the resize function again.
Any ideas would be greatly appreciated.
Regards
Paul Custance
|
|
|
|
|
Ok I answered my own question, but for those who would like to know the solution:
I called the function by "parent.parent.resize('iFrameId')"
The parent.parent called the function in my classic asp page that holds the iframe.
I then added the call to the OnResize event of the html tag on my aspx page.
Hope that helps
Paul C
|
|
|
|
|
hello...
I m facing Problem as follows....
I had created on DB in SQL server 2005..(TEST) with table (tblImage) (ImageID int, Image image)...
Then created on aspx page in VS 2005 C#.....
I had stored data with this page ... in DB ... (NO PROBLEM)
I had Retrive DATA From DB ... in DATASET .... (NO PROBLEM)
NOW IWANT TO SHOW THAT RETRIVE IMAGE IN <asp:image> Control on my page....
........... Help me.....
Thanking You....
|
|
|
|
|
|
Thx u .... this worked ... for me.......
|
|
|
|
|
when I insert an animated gif to a website it works in development but not in testing how can I make it work?
BiG RaLpH
|
|
|
|