|
I do not want to store values without any event. I have many textboxes and i want to store the inital value only based on some event.
Is there some event like onfocus or onkeydown for the textbox where i can store only for the textbox which is supposed to be changed.
Thanks
|
|
|
|
|
of course there is. You might use onfocus = "javascript:myarray[this.id]=this.value"
to initialize myarray with initial value if you want.
No big deal, do it whatever you feel like.
|
|
|
|
|
Hi all,
Am creating a report(matrix) using microsoft report viewer...
am getting the output like this:-
Code Name 24 25 26 27 28
1 Sam 9.81 9.81 9.81 18.81 18.81
Now i want to put the total of(9.81 +9.81 +9.81 + 18.81 + 18.81) as total as next column as given below
Code Name 24 25 26 27 28 Total
1 Sam 9.81 9.81 9.81 18.81 18.81 64.05
how can i do this?
Thanks in Advance...
|
|
|
|
|
Add a textbox in design view
right click got to value select the value =Sum(Fields!YourID.Value, "datasetname") in Dropdownlist
LatestArticle :Log4Net
Why Do Some People Forget To Mark as Answer .If It Helps.
|
|
|
|
|
Hello friends,
I am developing a shopping cart. I need a sitemappath in this. I implemented the code but the problem is that I have a categories table from which the sitemappath is fetching the data. In these categories some are main categories and some are their sub categories. For Example I am having a category structure like this:
Glassware>>Beer Glass>>Universal Beer Glass...
When I click on glassware, my sitemap shows like this: Home:Glassware
Then after that when I click on Beer Glass, the sitemappath disappears. ie the sitemappath is shown till I have one sub-level.
I did like this:
Please assist me....
public void GenerateXMLFile(string sFileName)
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["newcon"].ConnectionString);
SqlCommand cmd = new SqlCommand("select * from CATEGORY ", con);
cmd.Connection.Open();
SqlDataReader reader1 = cmd.ExecuteReader();
Encoding enc = Encoding.UTF8;
XmlTextWriter objXMLTW = new XmlTextWriter(sFileName, enc);
try
{
objXMLTW.WriteStartDocument();
objXMLTW.WriteStartElement("siteMap");
objXMLTW.WriteStartElement("siteMapNode");
objXMLTW.WriteAttributeString("title", "Home");
objXMLTW.WriteAttributeString("description", "This is home");
objXMLTW.WriteAttributeString("url", "~/index.aspx");
while (reader1.Read())
{
int MasterID = reader1.GetInt32(0);
objXMLTW.WriteStartElement("siteMapNode");
objXMLTW.WriteAttributeString("title", reader1.GetString(1));
objXMLTW.WriteAttributeString("description", reader1.GetString(5));
objXMLTW.WriteAttributeString("url", reader1.GetString(11));
objXMLTW.WriteEndElement();
}
objXMLTW.WriteEndElement();
objXMLTW.WriteEndDocument();
}
finally
{
objXMLTW.Flush();
objXMLTW.Close();
cmd.Connection.Close();
}
}
cheers,
sneha
|
|
|
|
|
Sneha ji,
Bottom-Top approach is needed in such scenerio
|
|
|
|
|
Hi ,
I am looking at the working of HttpModule lately ..... I am stuck up at a place
I have a class implementing IHttpModule which is supposed to catch any unhadled exception and redirect to a default page.
public class HttpModule2 : IHttpModule
{
public void Dispose()
{
}
public void Init(HttpApplication App)
{
App.Error += new EventHandler(App_EndRequest);
}
void App_EndRequest(object sender, EventArgs e)
{
HttpApplication App = (HttpApplication)(sender);
App.Response.Redirect("Default.aspx",true);
}
}
Now after that I put it in the web config
<httpModules>
<add name="ErrorModule" type="HttpModule2"/>
</httpModules>
but now if I introduce a divide by zero error in my code
protected void LinkButton1_Click(object sender, EventArgs e)
{
try
{
int k = 0;
int m = 100 / k;
Response.Redirect("MyTxt.txt");
}
catch (Exception ex)
{
throw ex;
}
}
it's still showing me the error page is there something i am missing , actually I am touching this area after 6 months or so ..i must be forgetting something.
|
|
|
|
|
Use server.Transfer instead of Response.Redirect .
|
|
|
|
|
|
Did you consider asking the author ? How would we know, we didn't write it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
only one page for a pdf is opening even if iam increasing the page content.. In this coding where to code, to increment the number of pdf pages.
That is what i mean to ask.
|
|
|
|
|
What I am telling you is that the odds of the people who happen to read the forum in the time since you posted having used this library is very low. So this is a dumb place to ask. There's forum just under the article where you can see what other people asked, and ask your question. Plus, you can always download the source and make it do what you want it to.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi,
Iam not sure whether this is the right message board to place this query..
In my intranet site Iam using vb.net...
I was able to access the site properly, but our network team had applied some security patches last night... the very next day when Iam trying to access the site, it is giving error message as Network error(tcp_error)
can anyone help me out...
Imtiaz A.K
|
|
|
|
|
Sounds like your server is no longer visible to your machine.
Tell the network clowns to fix it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Might be that IP is blocked using firewall from your ISP.
You need to call your ISP to make exception to that IP.
|
|
|
|
|
First Check you can ping the machine from your machine.
Please Post the exact error that you are getting and we will look at it
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
Hi,
Thanks for response...
I pinged the server and i got the reply...
even I can access that server using the remote desktop connection..
Thanks
Imtiaz A.K
|
|
|
|
|
ok , now Post the Complete Error that you get. Dont edit it, just post it the way comes
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
In the LAN Settings(in Connection Tab of Internet options) of my browser I had added the url in the "DONOT USE PROXY", now it is working.
is this the correct way...?
Imtiaz A.K
|
|
|
|
|
The below is the error which Iam gettig before..
Network Error (tcp_error)
A communication error occurred: ""
The Web Server may be down, too busy, or experiencing other problems preventing it from responding to requests. You may wish to try again at a later time.
Imtiaz A.K
|
|
|
|
|
Hi all.
I'm programming an site, where I create a file on server side, an I need it to be downloaded to client after it finishes.
At this moment, I am coding it step by step:
- A button to create the file
- Another button to download it, once it is created.
I can create the file correctly, but when I try to download it this is what happens:
There is an asp:textbox where I have the name of the file (I get the path with Request.ServerVariables("APPL_PHYSICAL_PATH") so that's OK)
Then I press the input type=button control I have, and call a javascript function like this:
<script type="text/javascript">
function Download(nom_fich)
{
window.open("Downloadfile.aspx?ar=" + nom_fich,"Download","width=10,height=10,resizable=yes;top=200,left=150,menubar=no,toolbar=no,status=no,location=no");
}
</script>
Once I am on the Page_Load event of the Downloadfile.aspx page, I get the parameter from "ar" and I just get "undefined".
I don't know if the problem is when taking the file name from the asp:textbox control, because when I get it from an input control, it is OK...
Please, help me, I have been searching for an answer for so long, and I can't stand it anymore.
Thanks in advance.
PS: This is the input button I use:
<input id="Bt_Descarga" class="" visible="TRUE" style="width: 100px" type="button" value="Download" onclick="Download(txtFile.text)" />
And this is the asp:textbox control I need to take the filename from.
<asp:Textbox ID="txtFichero" runat="server" CssClass="cuerpopar" Width="100%"></asp:Textbox> <pre>
<div class="ForumSig">Time to come clean...
Vive y deja vivir / Live and let live
Javier</div>
|
|
|
|
|
Have you looked at the URL at all ?
garfield185 wrote: onclick="Download(txtFile.text)" />
This quite obviously does not work. You need to get the client side id of the control, then use document.getElementById to look up the control, then get it's actual text. You can use the alert function to debug your code, if you do that now, you'll find that it's null, which is why you're getting the result you are.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
OK, I have no idea what you are talking about... Sorry!!! Could you please write a clue?
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|
|
txtFile.Text is not valid javascript. So, it's not working. On the server side, you can get the client side id of your control ( which is not even called txtFile, from what you posted ), and then you can use document.getElementById(clientId) ( where clientId contains that id you got from the server ), to get a reference to the actual control. Then you can get the text of the control ( I think .value is what you want, it's sure not .text ).
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Do you know any web page with an example of all this you are writing?
Time to come clean...
Vive y deja vivir / Live and let live
Javier
|
|
|
|