|
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
|
|
|
|
|
I dont Know... Where have u put the image...
but if u use <asp:image> Control .... it will work...
Try IT...
|
|
|
|
|
thx mihirhp I tried it and it is the same It doesn't animate do you have any other Idea?
BiG RaLpH
|
|
|
|
|
Hi,
I am Creating ASP.Net application,in my website I am using Login Controls
My Machine.Config contains following for connection string
add name="LocalSqlServer" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"
/connectionStrings
DataSource=.\SQLEXPRESS, But my system doesnot Have SQLExpress
I want to modify this, I changed my Web.Config as
add name="LocalSqlServer" connectionString="data source=.;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"
When I am executing the web site I am getting the following errors
The entry 'LocalSqlServer' has already been added
|
|
|
|
|
I need help about paging.how we create paiging in datlist as in datagrid.
suhail Ali
|
|
|
|
|