|
Hi Code project Team,
In page load default I’m showing "start time" dropdown,” End time" dropdown.
I'm giving one checkbox option to user, if user checks I’m enabling the button.
On that button click, I want to create client side dynamic controls for adding on start time, end time.
Start Time with 3 dropdown Hours, Mint, Unit (AM, PM).
End Time with 3 dropdown Hours, Mint, Unit (AM, PM).
This scenario is for measuring "SAMPLE “multiple start time, end time.
I want to calculate the duration of start, end time & show to user.
Can any one give me the idea or give me the good example to handle this issue.
Plz send the solution as soon as possible.
Thanks & regards
Shaik Mujeebuddin.
Analyst I
|
|
|
|
|
mujeeb_4m wrote: Hi Code project Team,
This is a common misunderstanding. The CP team creates the site, ordinary, unpaid people provide the answers.
Your dynamic controls need to be created before page load in order for viewstate to be restored to them. There's tons of info on google about this.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
My company used Oracle Application Express for develop application. Now we see that it isn't sufficient for us, so we have to choose between ASP and JSF. Can somebody give me one or more example where we'll see conection to oracle, implementing security access to database, work with data, controls design and another thinks to demonstrate that ASP is necessary for us. Thank You!
(Sory for my English, I study it now )
|
|
|
|
|
Nope. It's up to you to try out the different technologys to find out which works best for you. It's your company, and your applications so it's up to you to try and work out which works best for you. BTW - please use a more meaningful title than ASP.NET - this is obviously a question about ASP.NET - take a look at the name of this forum.
|
|
|
|
|
hi all,
Can anyone tell me how to pass data from code behing to data layer,
I am using asp.net with c# as code behind
Any suggestions would be welcome
Thanks
sri
|
|
|
|
|
mukkanti007 wrote: data from code behing to data layer,
Well, that depends on how your datalayer is. Simple way is pass through parameters. Assume you have a method to get products in the data layer, then it would be like
public string GetProductName(string id)
{
} here you can pass product id as string through the method parameter.
|
|
|
|
|
Thanks for looking
I have a sqlDatasource bound to a gridview's selectedValue
If i set the visible property of row 0 to false in the gridview, the sqldatasource is still ponting to row 0 (even when the row is not visible)
I would like the sqlDatasource to point to the first visible row
I cant filter the rows in the DB because i set visible to true or false depending on conditions that i apply in my VB code
Is there any way to accomplish this without many code?
Im doing it getting the rows into a dataview, applying conditions and binding the result to the gridview, it works but i was wondering if there is another way to do this
Perhaps another property that i can set to the grisviewrow since visible is not working
Thanks in advance
Alexei Rodriguez
|
|
|
|
|
I'm trying to request a variable from the url to pass into a stored procedure that will query the database and return the desired information but when I typed:
Dim Request As Integer = Request.Querystring("ID")
it returns the error 'querystring' not a memeber of string.
has anyone attempted something similiar and if so can they advise me on what i should do? Any help is most appreciated.
|
|
|
|
|
Request.Querystring returns a string, your Request variable is an Integer, you need convert the string to an integer before assigning it.
|
|
|
|
|
No, I think VB will accept this and do the conversion itself. I think the problem is that he's named his string 'Request'.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
You define Request as string, then try to access the Request object. You're confusing the compiler, it's trying to find the QueryString method on a string called Request. Call it something sensible.
Because you're using VB, I suspect you will get an integer without casting, but just because VB is crap, doesn't mean your code has to be. Use int.TryParse to work out if the value returned is a number or not, and set a default if it's not.
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
Thanks got it sorted yeah was because I was using request. I know the id being past as an integer so renamed and kept as integer works fine. Thanks guys for the help.
|
|
|
|
|
Hi All,
I have added a user control at runt time to my web form. But the button click event in the user control is not working. The control itself is not going in to the event handler. Please can any body help me. And I am using the below code
protected void LoadExampleUserControl()
{
try
{Control controlToLoad;
controlToLoad = this.LoadControl(pathToUserControls);
controlToLoad.EnableViewState = true;
this.div1.Controls.Add(controlToLoad);
}
catch { }
}
And I am calling this method in Page load event. I am I doint wrong. If so please give me suggestion. Or any help.
Thanks,
Aleem Mohammad.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
Make sure you are not calling this function inside !IsPostBack block. You need to add user control each time when page refreshes. AFAIK, page_load is not a safe place for dynamic controls. Override OnInit event and add your control there, ASP.NET can manage viewstate for this control then. Don't check IsPostBack there.
|
|
|
|
|
Thanks it is done Nav. Thank you very much.
S/W Engineer
Akebono Soft Technologies
aleem_abdul@akebonosoft.com.
|
|
|
|
|
I've just spent about two hours figuring out why a simple FormView, with only an InsertItemTemplate, and a SqlDataSource with a simple stored proc insert command, just would not insert. No exception was thrown, and even the ItemInserted event was firing, but in the DB? Nadda!
Then I realised I was probably adding a bad parameter to the Values collection in the ItemInserting even, and sure enough, the code below works because the commented out line refers to a non-existent parameter, but nothing tells one this. I like exceptions!
<code>
protected void fvTest_ItemInserting(object sender, FormViewInsertEventArgs e)
{
e.Values["commentTypeId"] = 1;
//e.Values["feedbackRefNum"] = GetFeedbackRefNo();
}
</code>
|
|
|
|
|
Brady Kelly wrote: an InsertItemTemplate, and a SqlDataSource with a simple stored proc insert command
Arrghhhhh. I hate the ...DataSource objects. It's such an untidy hack.
|
|
|
|
|
Wonderful for quick prototyping, or even real use, in very simple capture - view applications. Especially useful where the data structures change often.
|
|
|
|
|
Nope - the SqlDataSource is the hellborn son of Stan.
|
|
|
|
|
Pete O'Hanlon wrote: hellborn son of Stan
Can I assume the misspelling is intentional?
|
|
|
|
|
Brady Kelly wrote: SqlDataSource
That stuff is nasty, I never use it
Christian Graus - Microsoft MVP - C++
"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 )
|
|
|
|
|
I actually like it, this is the first time I've been bitten.
|
|
|
|
|
Hi all,
I am creating my database using the server explorer in VS 2005, I defined almost all tabes and relations I need except that I don't know how to impose a 'unique' constraint on a specific column called "username".
Any idea on how to do this using Server explorer?
Thanks
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
This isn't the right forum for SQL questions. You should use the SQL forum in future.
Open your table in design mode. From the 'Table Designer' menu, select Indexes/Keys. Create a new index and set its 'Is Unique' property to True.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks for the answer.. Done!
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|