|
My guess would be that the datakeys isn't populated. Have you steped through the code? If your grid isn't databound when the code is being run you won't have an id. Anyway, that is my guess.
Ben
|
|
|
|
|
i thought that originally as well, but when i debug it has incremented iid with the 2 which is correct
|
|
|
|
|
You know, I think this code is wrong:
sub getUser()
dim id as Integer
Session("userId") = id
msgbox(id)
It should be
id = CInt(Session("userId"))
if you are trying to get the id out of the session variable. Perhaps I am reading your code wrong?
Ben
|
|
|
|
|
thats excellent ben, works fine now
do you realise how long i have spent tryin to do this lol
cheers
boyindie
|
|
|
|
|
Glad that was it. Sometimes it helps just to have somebody else look at it.
Ben
|
|
|
|
|
Dear all,
I am using C# , asp.net and sql server 2005.
Let me explain the situation.
I have written procedure to insert data into the table and return last inserted value by @@identity variable. Now my question is how do I execute this process so that I can
Get last inserted variable values
Please help
thanks
imaran khan
|
|
|
|
|
Add a parameter to the stored procedure that is an output type.
@outID int output,
Then in your code right after the insert to select @outID = scopeIdentity(). Then in your call to the sp grab the output parameter after the call.
Hope that helps.
Ben
|
|
|
|
|
I have a form that is used for mass mailing. I select the html file that is to be the email and select which people recieve the email and then i send them. This all works fine.
However this system will be used to send 1000's of emails and so the time for completion is going to grow.
Is there a way i can show the progress while the emails are being sent.
Ive seen examples on how to do it when its the page that takes ages to load but none for when its a form.
Any Ideas?
|
|
|
|
|
It's pretty simple to build, you will need asp.net AJAX extensions for this.
Place the button and the other controls on an update panel with an updateprogress control above it. Hook the updatepanel to the trigger of the updateprogress control and you're all set.
The only thing you need to do now is to disable the timeout on the request, because it's going to take a while for the page to load and ASP.NET is going to complain when the request is taking too much time.
http://ajax.asp.net/[^]
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
|
I am using the visual studio designer and creating table adapters and strongly typed datasets. The question I have is how to override the InitConnection() method the designer creates for you.
I have two connection strings I would want to use (say local and remote). So I want to extend/enhance this method to determine which one it should be using. Any thoughts?
|
|
|
|
|
No need to override it if you use ASP.NET 2.0, there should be a ConnectionString setting in web.config. Change that and you can either use your local or remote database. In ASP.NET 1.1 you will need to set the ConnectionString property of the connection that is used by the commands of the DataAdapter.
WM.
What about weapons of mass-construction?
"What? Its an Apple MacBook Pro. They are sexy!" - Paul Watson
My blog
|
|
|
|
|
I was going to do that, but I was also looking for a programmatic way to do it. Previously, I had made my own custom data layer and included logic for it to determine which environment it was in, local or remote. This way I wouldn't have to update the web.config when I published.
I tried to use a partial class, either I didn't do it correctly, or it just didnt work.
|
|
|
|
|
I am showing a description field with 2000 Chars to a grid view. i want to display in the grid view the only first 20 or 30 characters only and not all the characters in this field. At the END of the 20/ 30 chars I wish to display More.. Hyperlink. When the user explicitly click the link, then I wish to display all the 2000 chars. Help me get start with. Thanks
Jey
|
|
|
|
|
Hope this[^] will give an idea.
Regards,
Satips.
Don't walk in front of me, I may not follow;
Don't walk behind me, I may not lead;
Walk beside me, and just be my friend. - Albert Camus
|
|
|
|
|
Satips wrote: Hope this[^] will give an idea.
Satips,
This article talks about some other concept not related to the original question. I am not getting why you are passing links and doing googling for them .
|
|
|
|
|
Use substring function either in your query or in GridView itemdatabound event. More link also can be added from ItemDataBound event
|
|
|
|
|
Navneeth, Thanks for your reply.
Actaully I would like to Bind data in gridview. I have been used Export to Excel functionality also.
I have been used below piece of style to show only one line... ; Export Excel also works fine & displays whole text.
text-overflow:ellipsis; overflow:hidden
I will try with your idea and let you know.
Jey
|
|
|
|
|
Hello Sir,
How to develop a search engine using C# in ASP.NET. Plz consider....
sandeephs
|
|
|
|
|
You question is too broad. These forums are for posting code you are having trouble with. If you search Code Project (and the internet in general) there are lots of articles about creating a search engine.
Also,
Please do not use text speak (plz) and do not address the forum as 'Sir' as we have both men and women here.
_____________________________________________
Flea Market! It's just like...it's just like...A MINI-MALL!
|
|
|
|
|
I have run in to a repetitive issue with Visual Studio where my solution will succesfully build but for some reason won't publish. It just says Build Failed.
I have two projects within the solution. One class and one website.
Any ideas??
|
|
|
|
|
When the build fails, are there any error codes? I had a similar problem with VS05 and it was related to duplicate class names. To find it, set your projects build output verbosity to "Diagnostic". This can be found here:
Tools > Options
In the dialog window, expand "Projects and Solutions"
Select "Build and Run"
It's the last option, its label is "MSBuild project build output verbosity"
When you build afterwards, take a look through the results in the output window, you may be able to find something there.
Hope it helps.
|
|
|
|
|
Hii Guys
I wonna make a circle radchart in a web Appl and i wonna fill it from a column in table in database using sql server 2000 i wonna fill the circle part with %Value
plss help me i am still new in asp.net uing vb
Developer
|
|
|
|
|
Hello,
How can I generate control from a code (C#) ?
for example: I Have a Wizard with 2 steps, In first I select a number from DropDown menu and click next and I want to have same quantity TextBoxes in Step 2 what I've selected in Step 1.
Thanks.
|
|
|
|
|
<br />
for (int iCount = 0; iCount < numOfTextboxes; iCount++)<br />
{<br />
TextBox tb = new Textbox();<br />
tb.Name = "tb"+iCount.ToString();<br />
wizardStep.Controls.Add(tb);<br />
}<br />
Or for example yank a placeholder on the spot you want to add the textboxes and than call placeholder.Controls.Add(tb);
|
|
|
|