|
Are you Sonia's brother ?
What do you mean by 'dynamic' ? Creating resources for each language is the best way I can think of to create resources so you can change the language of your site, if you wanted it to happen via some translation algorithm or something, that could only end in tears.
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,,
on my project asp.net with c#
I added a javascript item for eg,, name : JS.js
and made the next function :
function PopUpQtyWindow(id)<br />
{<br />
window.open("productqty.aspx?id=" + id, "Cart", "status = 1, height = 150, width = 200, resizable = 0"); <br />
}
then on any page i tried to call this function as next :
<br />
int prodID = 1 ;<br />
HyperTest.NavigateUrl = "javascript:PopUpQtyWindow(" + prodID + ");";
when running project and press the hyperTest .. status message " Error on page " .
thanks for all .
jooooo
|
|
|
|
|
1. What error message you get?
2. Do you have configuration like down below?
<br />
.<br />
.<br />
.<br />
<script type="text/javascript" src="JS.js"><br />
</script><br />
.<br />
.<br />
.<br />
I Love T-SQL
|
|
|
|
|
thanks for your reply my friend
the error message is appear on the status bar of the internet explorer :
Error on page,
that is the error message ,, no debug
jooooo
|
|
|
|
|
You can click on that error message to show you details, so you can see what the error is. Either the function is not present, or it's got an error in it.
I would recommend installing firefox and the firebug add on, then you can debug your javascript inside the browser.
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 )
|
|
|
|
|
I will install it and try ,,
thanks my friend
jooooo
|
|
|
|
|
Hi,
Test this way:
<br />
protected void HyperTest_OnClick(object sender, EventArgs e)<br />
{<br />
try<br />
{<br />
int prodID = 1 ;<br />
Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);<br />
}<br />
catch (Exception ex)<br />
{ <br />
throw;<br />
}<br />
}<br />
|
|
|
|
|
Really thanks for your reply ..
on my example the code as next :
HyperTest.NavigateUrl= ....
when i use the code :
HyperTest.NavigateUrl= Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);
then error message:
Cannot implicitly convert type 'void' to 'string'
thanks for aiding me
jooooo
|
|
|
|
|
No no, HyperTest.NavigateUrl is wrong.
Say, I test your code in this way:
<br />
<script type="text/javascript" language="javascript"><br />
function PopUpQtyWindow(prodID)<br />
{<br />
alert(prodID);<br />
}<br />
</script><br />
<asp:linkbutton id="HyperTest" runat="server" onclick="testClick" text="Test"></asp:linkbutton><br />
And in behind:
<br />
protected void testClick(object sender, EventArgs e)<br />
{<br />
int prodID = 1;<br />
Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "PopUpQtyWindow(" + prodID + ");", true);<br />
}<br />
This code is working on both IE and firefox browsers.
|
|
|
|
|
|
I have a DetailsView in which I have a DropDownList in the EditItemTemplate.
I need to access the list and populate it when the Edit command is clicked on the DetailsView.
I tried the following:
<br />
protected void dvStation_ModeChanged(object sender, EventArgs e)<br />
{<br />
DetailsViewRow row = dvStation.Rows[0];<br />
DropDownList ddlStatus = (DropDownList)row.FindControl("ddlStatus");<br />
ddlStatus.DataSource = dsStatus;<br />
ddlStatus.DataTextField = "STATUS_NAME";<br />
ddlStatus.DataBind();<br />
}<br />
But its not populating my list. I also tried a SqlDataReader, did the connection and SQL, then used a while loop to populate like:
<br />
cmd = new SqlCommand(sql, conn);<br />
dr = cmd.ExecuteReader();<br />
while (dr.Read() != null)<br />
{<br />
ddlStatus.Items.Add(dr.GetString(0));<br />
}<br />
That didn't do it either...
Any ideas?
Thanks.
Ekjon
|
|
|
|
|
Do it in the prerender event of the detailsview
Ask if currentmode is editmode
If so, get the ddl and bind it
Inside the prerender event
If Me.detailsview.CurrentMode = detailsviewmode.Edit Then
''Get ddl and bind it
End If
Alexei Rodriguez
|
|
|
|
|
Hi Alex,
It worked fine, thanks.
Now, the list is populated but I want to select the item that is the current status. So, in the same prerender - I opened the connection, got the data and tried to select it.
Didn't work.
Then I tried the same thing in ItemCommand event (Occurs when a button within a DetailsView is clicked), didn't work either.
Any idea on this?
Thanks again.
Ekjon
|
|
|
|
|
It should work
Once you get the dropdownlist in the prerenderevent (Edit mode)
populate the ddl and cal DATABIND
then: dropdownlist.selectedvalue = yourvalue
It looks like all you need is to allow the user to select a value from a dropdownlist when in edit mode, and obviously, when the record enters in edit mode, show the previously selected value
If so, you can do all this automatically
Just add the ddl to the edit template (Like you already have i think), you can also set its datasource to a sqldatasource
<EditItemTemplate>
<asp:DropDownList ID="DropDownList1" runat="server" SelectedValue='<%# Bind ("TestColumn") %>'>
</asp:DropDownList>
</EditItemTemplate>
Alexei Rodriguez
|
|
|
|
|
In my Project i have to add drop down selected item to datagrid on add button,nearly 10 items i have to add,so i have taken an shared datatable
and added row to that and assigned it to datagrid.
meanwhile when two users are working on the same .aspx page ,during postback the second user is getting the items added by the first user
Help me Regarding this....
|
|
|
|
|
Member 4567541 wrote: shared datatable
static in C# right ? A static member will be available to all the threads in the application domain. So all the users will get the same instance of DataTable . If you need to keep user specific data, keep it in session variables.
|
|
|
|
|
Yeah, he asked this twice, the first time, he was less clear, but I answered him the same, he voted me 1 and deleted his post. Man, that's annoying.
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 )
|
|
|
|
|
Christian Graus wrote: Man, that's annoying.
Yes, it's annoying. We take effort to help people and they will go without telling anything or leaving a "1" vote. It's really annoying. There are lot of people in IT industry who don't have any idea about the basics and working with big projects ! These might be the reasons why outsourcing sucks. You know big Indian companies like Wipro,infosys are taking more people and most of them are sitting idle or waiting for a project. Most of them won't be suited for this job, and they look only for huge salary, not job satisfaction or interest.
BTW, are you doing any outsourcing to India ? If yes, is that going well ? I am just wondering.
|
|
|
|
|
N a v a n e e t h wrote: BTW, are you doing any outsourcing to India ? If yes, is that going well ? I am just wondering.
I have done outsourcing to india and it has been a nightmare every time. I am happy to see that the article of the month has been won by someone with an indian name, I have hired people who I know, who happen to be indian, and who have done a great job, and I see good indian coders at MVP sumits, and here on CP, all the time. But, I think those people are being overwhelmed by the flood of terrible pretend programmers that are a side effect of the outsourcing boom ( which makes it the west's fault, these people are just going where the money is ), and too many people make the mistake of talking about Indian programmers, as if race is the issue. It obviously is not.
So, I would never outsource to india again, it was always hell for me. But, I do hire Indians, some of the best coders I know, happen to have come from India. I just need to know them personally and know they are good, the quality of coders still in India is far to variable to just grab a firm and try to work with 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 )
|
|
|
|
|
Christian Graus wrote: But, I do hire Indians
That's good. I like to work with you . I think I am good at ASP.NET and windows applications (other than graphics related). If you are planning to hire anyone, I will be glad to get included in to the list of the names you have in mind.
Also don't think that I posted the previous message with this intention, I was just asking your outsourcing experience, after seeing your reply, I just got this idea.
If you are interested, please let me know.
|
|
|
|
|
Fair enough. I am not hiring anyone right now, but if I need someone, I will let you know. Actually, I may have a website job coming up.
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 )
|
|
|
|
|
Christian Graus wrote: Actually, I may have a website job coming up.
Thanks. I am looking forward for that
|
|
|
|
|
Interesting that you got the same answer again, even if you deleted your original question and gave me a 1 vote for trying to help you.
I suggest buying a basic book on VB.NET, and reading it, because it's clear there are some fundamentals you do not understand ( like what 'shared' is )
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 )
|
|
|
|
|
|
A shared ( that's static in VB land, right ) datatable is a very poor design IMO. You need to make your DATABASE the static point, where data is stored permanently across all users. However, I'm not sure how to help you, I'm not sure what your question is. You're surprised that static data is visible to all users ? You expected it to be, but it's not ? What is the problem ?
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 )
|
|
|
|
|