|
Take a look here:
string Dd_day_shift_i;
DropDownList strr=Dd_day_shift_i;
Dd_day_shift_i is a STRING and you are tring to assign it to a DropDownList object (second row of code).
Bye
Federico
|
|
|
|
|
what u r intending to say?conversion is not possible or what?
if there any solution ,let me know..
|
|
|
|
|
In your code you have this string referece
<br />
string Dd_day_shift_i;<br />
In this line of code
<br />
DropDownList strr=Dd_day_shift_i; <br />
you are tring to assign a string reference to a DropDownList reference and it's not possible.
Which is the target of this code? Do you want to add some items in the DropDownList?
Regards
Federico
|
|
|
|
|
ok tell me can we create an array of dropdownlist as we could do in visual basic.
Actually regarding the previous question can i populate 31 dropdownlist with same values from the DB writing a single function.Other wise i will have to call the below defined function 31 times and the id of the dropdownlists are as follows(Dd_day_shift_1,Dd_day_shift_2,.......,Dd_day_shift_31)
private void pop_shift(DropDownList ddl)
{
ddl.Items.Add("-Select-");
SqlDataAdapter da = new SqlDataAdapter("select shift_name from shift_add",con);
DataSet Obj_dse = new DataSet();
da.Fill(Obj_dse);
ddl.DataTextField=Obj_dse.Tables[0].Columns["shift_name"].ToString();
ddl.DataSource=Obj_dse;
ddl.DataBind();
}
please help!
|
|
|
|
|
Can you put your dropdown lists in a repeater control? Only need to set up the binding in one place then.
|
|
|
|
|
Hi Everyone,
I have checked with html code for custom page size but i need to print
with this page size
code:
<html>
<head>
<style>
@page Section1{size:297.35pt 9.5in;}
</style>
</head>
<body>
<div class=Section1>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
Can anyone help me in this regard.
Regards,
Manowj
modified on Wednesday, January 09, 2008 8:08:28 AM
|
|
|
|
|
Hi all,
I have a code like this.If any error occurs I want to retrive the varriable which generated the error.How can I ?
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Catch ex As Exception
Response.Write(?)
End Try
Thanks
Dana
|
|
|
|
|
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Catch ex As Exception
Response.Write(Request.QueryString("Code"))
End Try
Something like that?
|
|
|
|
|
Thanks for the reply Paddy Boyd,
Can I able to write the varriable name which produced the error.Like
Response.Write(Request.QueryString("strCode"))
|
|
|
|
|
Why would you need to do that? You can print the error message and the stack trace - these will contain that information, but i don't think you really want to do that.
|
|
|
|
|
Suppose if am going to test the values for more that one column then i have to write this like one..
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Catch ex As Exception
Response.Write("Invalid code")
End Try
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Age")
Catch ex As Exception
Response.Write("Invalid Age")
End Try
Like that...
But I want to do some thing like
Try
'Error if the user inputs some string
Dim strCode As Integer= Request.QueryString("Code")
Dim strCode As Integer= Request.QueryString("Age")
Catch ex As Exception
Dim strDescription as string=String.Empty
'Check for the value generted the eror
'and assign description
Response.Write("Invalid" & strDescription )
End Try
Thank
Dana
|
|
|
|
|
Any one has some idea ?
Dana
|
|
|
|
|
can anyone help me out to integtrate payseal or provide me any sort of information regrarding how to implement it. and what r requirements for implementing it.
thanks in advance
alok tripathi
|
|
|
|
|
You should ask this on the payseal site.
|
|
|
|
|
I can set up a website with some folders requiring that users log in before being able to access the aspx pages therein using forms.authentication, and configuring web.config appropriately - all fine and dandy.
So if, say, a protected folder is "members" and someone tries to access members/index.aspx they are redirected to a login page first. Great - but if there is a pdf in that folder, say members.pdf then ANYONE can still browse directly to members/members.pdf WITHOUT being logged in.
How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way? Just a pointer will do.... thanks
|
|
|
|
|
Fred_Smith wrote: How do I set about protecting .pdf, .doc, jpg etc files from unauthorised access in this way?
You can write the handler and allow .pdf/.doc/.jpg etc access only through application and stop them when trying to access through browser directly.
Get it
http://www.uberasp.net/getarticle.aspx?id=13[^]
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
|
You are welcome
------------------------------------------------------------
"The only true wisdom is in knowing you know nothing." --Socrates
|
|
|
|
|
hmm... tried that, word for word, and an even simpler "hello world" type example I found elsewhere (though it was the almost identical code) - and while it compiles fine, when I try to browse to an aspx file in the app I get the error:
"Could not load type [class name] from assembly [assembly name]"
(If I browse to a jpg - one of the filetypes I'm trying to protect - it is shown as normal.)
I have tried googling this error, but have found nothing useful - just a reference to it possibly being to do with the GAC, but no help...
... I don't suppose you've got any ideas...?
cheers
Fred
|
|
|
|
|
Dear All,
I am very new to ASP.NET. Actually this is my first project.
I designed my pages and tested it on the lcoalhost and it worked will
But when I uploaded one aspx page the my host server I received a server error (shown in this link)
www.mersaal.com/home.aspx
Anybody can tell me if there are any special procedures for aspx file when published
It may be trivial problem for everybody here
Mohamed Gouda
Egypt
|
|
|
|
|
Edit your web.config to set the customerrors mode to Off, as suggested. You should then be able to see the underlying error.
|
|
|
|
|
I did so and reloaded my aspx file, but the same error appeared
Shall I upload the web.config file too
however thanks
Mohamed Gouda
Egypt
|
|
|
|
|
Yes, your site should have a web.config file.
|
|
|
|
|
Thanks a lot
I discovered my fault while trying your advice
I had to upload my dlls created in the bin dir by VisualStudion.Net
however, thanks
Mohamed Gouda
Egypt
|
|
|
|
|
I know this is a quite a general question but can anyone recommend a good website for buying an ssl certificate.
The prices appear to vary considerably across the different companies therefore its hard to choose the correct one
thanks in advance
|
|
|
|