|
Hi,
I want to create an application “Message Board “like code project. When any user can ask question and can view the answer like given in Code project. Please give me idea to develop such type of allocation or send me link.
Regards
Rajesh
rajesh
|
|
|
|
|
Buy a book on ASP.NET and work through it. Buy a book on SQL and databases, and work through it. If you want the sort of features CP has, buy a book on javascript and DHTML and work through 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 )
|
|
|
|
|
hi all
I have some code is VB.net but i dont understant it
Dim strdemo as String
strdemo = "demo"
Dim strdemo1 as String
strdemo = "demo1"
If Ucase(strdemo ) Like "*" & Ucase(strdemo1 ) & "*" Then
END IF
If i convert this code to C#. How can i do that??.
|
|
|
|
|
This needs to be in the VB forum.
|
|
|
|
|
Basically, the person who wrote this has no idea how to use .NET. Methods like Ucase should never be used.
I think this belongs in the C# forum, it sure doesn't belong here. It has nothing to do with ASP.NET
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 )
|
|
|
|
|
hi there,
I have specified users to my web site designed using ASP.net over VB
But actually number of users needed to be larger than they are be added via normal ASP.net configuration, and I need to take them from my database
example : I have a table containing all employees I want them to access my site authenticated and authorized
How can I make them login with there usernames and passwords saved in that table
note : the database used is SQL
I hope that I explained it right
urgent help is needed
There is always something to learn
|
|
|
|
|
Surely the built in control can do that ? If not, you need to write your own solution.
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 a lot
I am trying it now
There is always something to learn
|
|
|
|
|
Hi,
When I export grid view to excel in asp.net 2.0. It successfully exported but I did localization.
I want to save exported excel file name save in Korean language. When I put file name in Korean language like
protected void ExportGridView(Control grdView, string strFileName)
{
string attachment = "attachment; filename="??".xls";
Response.ClearContent();
Response.AddHeader("content-disposition", attachment);
Response.ContentType = "application/ms-excel";
StringWriter sw = new StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
grdView.RenderControl(htw);
Response.Write(sw.ToString());
Response.End();
}
The out put comes like “리í´.xls” but I want to save like “??.Xls”
How can I do this to save file name as korean language .
Regards
Rajesh
rajesh
|
|
|
|
|
Thanks to Abisodun and Mike for answering my previous post. Both of the answers was directed to the 2nd part of my question. On the first part, I still need help. So - here's it again:
I am using MultiView / View controls which change by MenuItem clicks. Each view has a GridView on it with Edit and Insert features.
The problem is: when the edit button is clicked, the GridView disappears and you need to click on the MenuItem again to see it (it happens evrytime you click edit, update, cancel or insert buttons on the GridView).
Any ideas?
Thanks.
Ekjon
|
|
|
|
|
As I said in previous post, you might miss to bind the dataset in your pageload after postback...
Can you show us what you wrote in PageLoad and Edit event?
|
|
|
|
|
Hi Michael,
Here's what I'm doing: for the common part of the page, I am using dataset to populate some textbox controls, then for the details part - I'm using GridViews with a SqlDataSources. Each of the GridViews are placed on a View control being changed by MenuItem clicks. Here are some code:
protected void Page_Init(object sender, EventArgs e)
{
projectId = Convert.ToInt32(Session["ClickedId"]);
string [] dataKeys = {"MethodSID"};
conn = new SqlConnection();
// Get the ConnectionString dynamically
conn.ConnectionString = ConfigurationManager.ConnectionStrings["EEM-NEWConnectionString1"].ConnectionString;
dsrcMethods.ConnectionString = conn.ConnectionString;
Parameter param;
dsrcMethods.UpdateCommand = "update tblMethod set MethodName=@MethodName, MethodDesc=@MethodDesc,"
+ "TaxonomicalKeys=@TaxonomicalKeys, TaxonomicalDesc=@TaxonomicalDesc"
+ " where MethodSID=@MethodSID and ProjectID=" + projectId;
dsrcMethods.InsertCommand = "insert into tblMethod (ProjectID, MethodName, MethodDesc, TaxonomicalKeys,"
+ " TaxonomicalDesc) values (" + projectId + ",@MethodName,@MethodDesc,"
+ " @TaxonomicalKeys,@TaxonomicalDesc)";
param = new Parameter("MethodSID", TypeCode.Int32);
dsrcMethods.UpdateParameters.Add(param);
param = new Parameter("MethodName", TypeCode.String);
dsrcMethods.UpdateParameters.Add(param);
dsrcMethods.InsertParameters.Add(param);
param = new Parameter("MethodDesc", TypeCode.String);
dsrcMethods.UpdateParameters.Add(param);
dsrcMethods.InsertParameters.Add(param);
param = new Parameter("TaxonomicalKeys", TypeCode.String);
dsrcMethods.UpdateParameters.Add(param);
dsrcMethods.InsertParameters.Add(param);
param = new Parameter("TaxonomicalDesc", TypeCode.String);
dsrcMethods.UpdateParameters.Add(param);
dsrcMethods.InsertParameters.Add(param);
gvMethods.DataKeyNames = dataKeys;
gvMethods.DataSourceID = dsrcMethods.ID;
}
protected void Page_Load(object sender, EventArgs e)
{
txtID.Focus();
txtID.Enabled = false;
txtTitle.Enabled = false;
txtAbstract.Enabled = false;
txtJust.Enabled = false;
txtSponsor.Enabled = false;
txtStartDate.Enabled = false;
txtStatus.Enabled = false;
txtEndDate.Enabled = false;
txtProgress.Enabled = false;
txtAck.Enabled = false;
if (!Page.IsPostBack)
{
conn.Open();
try
{
txtID.Text = projectId.ToString();
// Create SqlCommand and Parameter to select ProjectID
cmd = new SqlCommand("Select * from tblProject where ProjectSID=@ProjectID", conn);
cmd.Parameters.Add("@ProjectID", SqlDbType.Int);
cmd.Parameters["@ProjectID"].Value = projectId;
dsProject = new DataSet();
da = new SqlDataAdapter(cmd);
da.Fill(dsProject);
cmd.ExecuteReader();
// If there are no records for the user
if (dsProject.Tables[0].Rows.Count == 0)
{
lbl = new Label();
lbl.Text = "<p>You do not have any data for this Project</p>";
Controls.Add(lbl);
}
else
{
txtTitle.Text = dsProject.Tables[0].Rows[0].ItemArray[1].ToString();
txtAbstract.Text = dsProject.Tables[0].Rows[0].ItemArray[2].ToString();
txtJust.Text = dsProject.Tables[0].Rows[0].ItemArray[3].ToString();
txtSponsor.Text = dsProject.Tables[0].Rows[0].ItemArray[4].ToString();
txtStartDate.Text = dsProject.Tables[0].Rows[0].ItemArray[5].ToString();
txtStatus.Text = dsProject.Tables[0].Rows[0].ItemArray[6].ToString();
if (dsProject.Tables[0].Rows[0].ItemArray[7].ToString() == null ||
dsProject.Tables[0].Rows[0].ItemArray[7].ToString() == "")
txtEndDate.Text = "Not Applicable";
else
txtEndDate.Text = dsProject.Tables[0].Rows[0].ItemArray[7].ToString();
txtProgress.Text = dsProject.Tables[0].Rows[0].ItemArray[8].ToString();
txtAck.Text = dsProject.Tables[0].Rows[0].ItemArray[9].ToString();
}
// Cleanup command and connection objects.
dsProject.Dispose();
da.Dispose();
cmd.Dispose();
conn.Close();
}
catch (Exception ex)
{
// Add error handling here for debugging.
Response.Write(ex.Message);
//System.Diagnostics.Trace.WriteLine("[ValidateUser] Exception " + ex.Message);
}
}
}
protected void mnuProjectDetails_MenuItemClick(Object sender, MenuEventArgs e)
{
gvMethods.Focus();
// Get the MenuItem Clicked
int item = Int32.Parse(e.Item.Value);
if (item == 0)
{
conn.Open();
dsrcMethods.SelectCommand = "select * from tblMethod where ProjectID=" + projectId;
conn.Close();
}
else if (item == 1)
{
conn.Open();
dsrcTools.ConnectionString = conn.ConnectionString;
dsrcTools.SelectCommand = "select * from tblTool t, tblMethod m where m.MethodSID=t.MethodID and"
+ " m.ProjectID=" + projectId;
gvTools.DataSourceID = dsrcTools.ID;
conn.Close();
}
MultiView1.ActiveViewIndex = Int32.Parse(e.Item.Value);
}
Thanks for taking your time and I'm positive that you can find something for me.
|
|
|
|
|
Try like that..
In Page_load
<br />
if (!Page.IsPostBack){<br />
}<br />
else{<br />
}<br />
|
|
|
|
|
I know it is embarrassing to ask such a question but how do you navigate in your page?? ie. backward, forward or load a specific url in the same page "I'm using Process.Start("www.url.com");" but I dont want a new page/tab, I want to load it in the same page..
Thank you guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
If you're using Process.Start, it's not going to work when you deploy your site, as it's launching on the server, not the client. Server.Transfer and Response.Redirect are how it's done. The difference is that Server.Transfer doesn't do another round trip and therefore the URL in the users browser does not change.
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 )
|
|
|
|
|
Use Server.Transfer as Christian has suggested.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Hello Friends,
I am using Asp.net 2.0 with C#.
I have Three textbox ..,txtname,txtAddress,txtphno,and each textbox has Requiredfield Validator.I am inserting Record and show record throuh 2 button ie. Save and ShowRecord button
My problem is when i want show record through Textname textbox putting name(bind through DataReader)
and click on show record then the message comes that other two textbox means txtaddress,txtphon can not blank which i have given in error message.
When i remove validation control then record will be shown in textboxes.
Plz give me some Idea.
parameswar mal
|
|
|
|
|
1. I think, you can group the validators in ASP.NET 2.0. I haven't tried using it but read somewhere that it does. so, you probably can try..
OR
2. You can use the custom validators with client-side validation
OR
3. Use Javascript-validation or Server-side validation..
|
|
|
|
|
any body tell me about div why we use this in ASP.net withj some example
h
wasim khan
|
|
|
|
|
Are you a Student or Programmer.
SSK.
Anyone who says sunshine brings happiness has never danced in the rain.
|
|
|
|
|
I recommend you buy a basic book on HTML and read it. A div is HTML, it has nothing to do with ASP.NET, excepting that ASP.NET is an engine that creates HTML.
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 )
|
|
|
|
|
<h1><span style="font-family:Verdana;color: #ff3300">Server Application Unavailable
</span></h1>
<p>
<span style="font-family:Verdana;">
The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request.
</span>
Administrator Note:
An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur.
</p>
Simply, how do you produce an aspx page and browse it through your iis??
Many thanks guys
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
You point IIS's root folder to the root of your application, make sure that ASP.NET is installed with IIS ( if you installed VS after IIS, it is ), and that default.aspx is a registered default page, then browse to localhost.
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 )
|
|
|
|
|
Hello Christian!
When I see your name below my question, I know my question was answered
Thank you for your help, but it's really my first aspx page ever and I didnt think it's that hard to produce and browse a "Hello World!" page, anyhow, the thing is that I have a very simple page that runs nicely by (Ctrl + F5), I publish it and set the publish directory as a virtual directory from my IIS but cant browse it like the other html files, so basically, I'm asking here cuz I have no clue where could be the problem and by googling, I can see it's a common problem with no good answer I could find.
Thanks again Christian, you're really the best
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
If IIS is pointing to the right directory, then I really don't see how it could go wrong, unless you typed 'localhost' with no page name after it and there's no valid default page there.
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 )
|
|
|
|