|
I have a datalist that as two button in item template.i want to when i click on a button get the id of that row.that type of id is char.in witch event I should write this code.
|
|
|
|
|
In the click event for the button ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
ItemCommand . There are more specific event such as UpdateCommand DataList Events[^].
Eslam Afifi
|
|
|
|
|
hello everyone! i've got the following problem.
In web.config i've defined a section
<databaseSettings>
<add key="dataSource" value="someDB.sdf"/>
<add key="password" value="somePass"/>
<add key="connectionString" value="Data Source=<_here_should_be_value_of_dataSource_entry_>;Password=<_and_here_value_of_password_>;"/>
</databaseSettings>
the problem is how values of "dataSource" and "password" entries could be used in "connectionString" (as i've tried to show above). i am using this values in code to manipulate data base file as well as to initiate db connection. thus i need all this entries, and it will be quite handy if any changes in db (e.g. name or pass) will cause changes in only one place in the web.config. can someone help me out with this problem?
thanks
|
|
|
|
|
Hi,
I have an gridview in which I have placed an TEXTBOX.
There are option in the gridview such as accept and reject on both the actions the user will enter some text in the TEXTBOX which will be emailed to the user.
I m doing this on rowcommand event of gridview but I m not able to retrieve the value in the TEXTBOX.
the code is as following
if (e.CommandName == "Accept")
{
int index = Convert.ToInt32(e.CommandArgument);
int id = Convert.ToInt32(GridView1.DataKeys[index].Value);
string tbcomment = ((TextBox)GridView1.Rows[index].FindControl("txtComment")).Text;
TextBox text = (TextBox)GridView1.Rows[index].Cells[8].FindControl("txtId");
Label tb = (Label)GridView1.Rows[index].FindControl("lblId");
Response.Write(tbcomment);
grid_bind();
}
NOT GETTING THE VALUE IN TXTCOMMENT THAT THE USER WILL WRITE.
ANY SUGGESTION?
Vijay V.
Yash Softech
|
|
|
|
|
|
i can send a value to other form with this code:
Response.Redirect("~/Default2.aspx?Mode=" + TextBox1.Text);
but i can not get it in default2.aspx. can any body help me?
|
|
|
|
|
You should get values in the second Page
This Technique is called passing value in QueryString
Make sure that TextBox1.Text is havinf somw value
in 2 page use request object to get the value
this.Request.QueryString["Mode"]
It will return its value
Thanks and Regards
Sandeep
If If you look at what you do not have in life, you don't have anything,
If you look at what you have in life, you have everything... "
Check My Blog
|
|
|
|
|
You are passing the value by request query string.In default2.aspx you should use
string str=request.querystring["Mode"];
your's subbu
|
|
|
|
|
Hi all,
I have a requirement of converting/exporting the html data of webpage into power point.
i.e, i have a gridview control along with with other asp controls and i have button 'btn_exportToppt', when i click on this button the gridview data should be saved in powerpoint with style shhets like an image.
Please suggest me how to do this..
Thanks in advance,
sekhar
|
|
|
|
|
There is an article in CP at this link[^].
You can take this as a start point.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
i also facing same problem .
have yopu any solution for that.
hasan
|
|
|
|
|
Dear All
I am using crystal report in my web application developed in Asp.net 2003 and sql server 2000.Report are working fine in my local PC but when I trying same thing in server then, PDF reports are working fine but excel reports are showing following Error:
"## Error in File C:\WINDOWS\TEMP\temp_b80d89a4-560d-48a4-923d-7f1d541ccf16.rpt:Error detected by export DLL: ##"
Please help me ASAP.
Thanks
With Regards
Vivek
|
|
|
|
|
can any one have any idea is it possible to use values from aspx.cs file(codebehind file) in an aspx file(main asp.net page)
|
|
|
|
|
Those two Files represent one thing. please Explain briefly what you want to achieve
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
just guessing at what you need, but you can embed <%= expr %> tags in the .aspx page, where expr is any public method or expression
for example
<%=CustomerName%>
would be replaced with the value returned by a public property CustomerName
there are other variations on this technique as well; is that what you were looking for?
|
|
|
|
|
Good Morning All
Am trying to Store the username of the User that will be loged on. choose to use the Profile, and i have done the following from the Web Config file
<profile enabled ="true">
<properties>
<add name ="Username" readOnly ="false" allowAnonymous ="true"/>
</properties>
</profile>
And am Storing the Username to the Profile like this
Profile.UserName = username;
I get an error the C# code that says
property or indexer 'System.web.ProfilerBase.Username' cannot be assigned to--it is read only .
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
In ASP.NET application, the page is encoded in UTF8 and data (include English and Non-English) is stored in NVARCHAR data type in database. Do I really need DataSet.Locale to help on Sorting?
What will be different or any impact if I use DataSet.locale vs I don't set locale in Dataset?
|
|
|
|
|
If you don't set the locale, you will not use the correct sort order for each language.
If the sort order is similar, there may still be some differences. Like for example if v and w are sorted together or not, and if characters like å, ä and ö come last in the alphabet (as in swedish) or are considered forms of the characters a and o.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
I use n-tier architecture in my day to day programming.
If I use a sqldatasource to connect to a database then it seems the select query gets generated within the aspx page. So this to me does not seem to be n-tier because the database access is within the aspx page itself rather than using another layer.
Question:
1)
How can sqldatasource be used in an n-tier architecture developemnt.
2)
Am I right to say that the answer to my question is ObjectDataSource?, if so, does this have limitations to the coding the connection, command, etc, in the code ?
Thanks
|
|
|
|
|
Every Wizard that you will use in VS will have limitations. it is better to Write your DAL and your BLL. you right if you use the datasource control,your DAL will now be in your PL(Presentation Layer) and that will not be "N-tier" Style.
Hope this helps
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
I just started a new contract and the tech lead told me that he wanted me to become familiar with something called "JROC" (among some other tools).
I've been searching the web and I haven't found any dev tool called "JROC."
Based on the name of the tool, it sounds like it encapsulates some javascript functionality.
I have tried searching for different spellings - "JROK" / "JROCK" / "JROQ" but I haven't found any matches.
Have you ever heard of a dev tool by this name?
|
|
|
|
|
I am getting a weird error when I try to create a user through Web Site Administration Tool - http://tinyurl.com/3qww3y[^]
The root causes does not appear to be clear. Any suggestions on how to debug this issue?
|
|
|
|
|
I am using VS2008 and I am can't seem to figure out how to open the "Web Site Administration Tool."
MSDN says - "To access the Web Site Administration Tool, on the Website menu, click ASP.Net Configuration."
However, I don't see "Website" as a top-level or child menu item or under "View>Toolbars>Customize."
Am I missing something here?
|
|
|
|
|
It's right between Refactor and Build on the toolbar if you are actually working on a web application.
|
|
|
|