|
No they are not primary keys
One way would be to add 1 to every number that is in the table after the new number which has been entered, do you think this is feasable?
I would know what the new number entered would be so I could just match that to a number in the database and add 1 to the exisiting numeber and then to every number after that, phew!!
I know that every number in the list would be in order after that so that wouldn't be an issue.
|
|
|
|
|
I Copied the Menu1 Control form 1 form to another form because the other form contains the same coding and also some
additional coding for that form.
But it gives me above error.
|
|
|
|
|
sjs4u wrote: The name 'Menu1' does not exist in the current context
The error message is clear enough. Isn't it ?
|
|
|
|
|
What makes you feel that the control does exist, when the error message tells you it doesn't ? What help do you expect from us when it's clear what the error message means and you've posted no code to try and prove that the error is wrong, or to help us point out why it's right ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Did all the < and > tags came along with the copy?
|
|
|
|
|
Hello,
I have to implement field level security in web application, for that purpose i need the list of controls from ( a specific aspx page selected from ddl present in our application).
Please give me sample code if u have any idea.
Thanks alot
Regards Syed Kamran ul Haq
ALLAH HAFIZ
|
|
|
|
|
You should try searching on google for questions like that before you post here, im sure someone else will say the same
|
|
|
|
|
Syed Kamran ul Haq wrote: I have to implement field level security in web application
What do you meant by field level security ?
|
|
|
|
|
just like we give rights to a web form to according to user, i have to give rights to a web control in a web page(e.g visible or enable = true/false) according to user.
Example:
Admin can edit a textbox 'txt1' in a web page page1.
Jeo can just view a textbox 'txt1' on the same page.
I am creating a web page in which i will select a web page from DDL. All the control on selected should be shown, so that i can give rights to them.
Thanks for answering.
Regards Syed Kamran ul Haq
ALLAH HAFIZ
|
|
|
|
|
Your requirement seems to be odd. I don't think that you can have field level security as you told. Alternatively, you can implement a rule validation system to your business objects in the same way like CSLA does. Then add rules for different kinds of user, and when user trying to save the BO, throw error indicating the broken rules.
|
|
|
|
|
You should use the standard asp.net login control and then through the web configuration you can then asign rights to users.
If you dont want to do that use the following:
Put a column in your login table and call it permissions, then set the permissions as so:
User1 rights = 0
Admin rights = 1
then just check this value in your c# code e.g.
if (rights = 1)
{
txt1.enabled = true;
}
else
{
txt1.enabled = false;
}
something like that, remember what Ive written is half pesudo code so you just need to amend that
|
|
|
|
|
Please don't ask variations of the same question over and over. Continue the discussion where it was started. If you want quicker answers, ask clearer questions to start with.
Your best bet is to build the lists yourself, not try to auto generate them.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello friends.......
I want to move some text from one textbox to another textbox on onblur event..
I have this javascript code that is working perfectly with the HTML controls
function putMailid()
{
var x=document.getElementById("txtLogin").value;
document.getElementById("txtEmailID").value=x+"@gmail.com";
}
but i don't know that how to use it with asp.net textboxes..
Bcoz there is no Onbluer event......
Plzz help me out
Deepak Nigam
|
|
|
|
|
I recommend you do some reading on ASP.NET. Basically, just because the IDE doesn't show you an event, doesn't mean it doesn't exist, it just doesn't exist on the server side. You can add an onblur to a textbox, and it will be passed to the client and work perfectly.
Your next problem is getting the cliend side Id of your textboxes. This is represented by the ClientID property of your server control. You need to write that to the client, either inline in your script, or as script that creates js variables you can use. Also never call document.getElementById and assume it returns something, add a step that checks it.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
how to get the Process name which is accesing/ using my file. I want to get the process name which is reading my file using web application
Thanks in advance
|
|
|
|
|
What you want is impossible. A web app runs in the browser, and cannot enumerate processes on the local machine. Why would you want to do that ?
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I have the following code:
When it runs I get the error:
<b>System.InvalidCastException: Specified cast is not valid.</b>
chkIgnore = a checkbox
Ignore = a field in a database type nvarchar size 1, can either have Y or N in the column
If anyone can help that would be great, bit stuck on this one.
thanks!
protected void OnRowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
bool ignore_box = true;
if (DataBinder.Eval(e.Row.DataItem, "Ignore") != null)
{
if (DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "Y" || DataBinder.Eval(e.Row.DataItem, "Ignore").ToString() != "N")
{
ignore_box = (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
}
if (ignore_box == true)
{
((CheckBox)e.Row.FindControl("chkIgnore")).Checked = true;
}
}
}
}
|
|
|
|
|
.netman wrote: DataBinder.Eval(e.Row.DataItem, "Ignore")
You're calling this method three times because...... ????
.netman wrote: Ignore").ToString() != "Y"
.netman wrote: (bool)DataBinder.Eval(e.Row.DataItem, "Ignore");
You're assuming because the the field is not a string starting with Y or N ( and not y, n, t, T, F, f, or any other letter or character ), it must be a bool. Either your data source is seriously messed up, or your understanding of how this works is. Judging from the error message you're getting, I'd say the latter. You can't just convert anything to a bool, it has to be a bool. It's obviously not. At a minimum, you should put this code in a try/catch, and then set a default. Probably, you should replace it with a default.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi
I managed to sort it
The database field was set as nvarchar so I changed it to bit.
Then I changed or the N and Y to 0 and 1
Its all working now!
Its always better when you fix it yourself
|
|
|
|
|
Yeah, doing it right in the first place helps
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
but if i did that I wouldnt get such great answers from people like yourseleves!
|
|
|
|
|
*grin*
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Does anyone have any idea how I can set a transparency key for an image (Most likely white or, my favourite, Fuschia) - Normal C# has the .MakeTransparent(Color.Fuschia);, yet the ASP.NET Image boxes seem to lack the method...
I have code to pretty much create small images over a large image, which are being loaded from the web, and they're not exactly square, and these random white boxes are... disorienting
Maybe a way to customise a .jpg to be transparent by default, and THEN upload it... ?
Any help would be GREATLY appreciated!
- Reelix
|
|
|
|
|
I believe that later versions of IE support transparency in PNG images.
Also, ASP.NET is constrained by what HTML allows.
Christian Graus
Please read this if you don't understand the answer I've given you
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Well, it seemed it needed an actual transparency settings.
Paint.NET's transparency function worked wonders
Thanks anyways
- Reelix
|
|
|
|